mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-21 04:32:23 +00:00
Change exception on failed import for Python 2 compatibility
This commit is contained in:
committed by
Thomas Krijnen
parent
8d4f34461e
commit
f84982f99a
@@ -33,13 +33,13 @@ def has_occ():
|
||||
try:
|
||||
import OCC.Core.BRepTools
|
||||
return True
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import OCC.BRepTools
|
||||
return True
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
return False
|
||||
@@ -57,7 +57,7 @@ if has_occ:
|
||||
|
||||
try:
|
||||
from OCC.Core import TopoDS
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
from OCC import TopoDS
|
||||
|
||||
def wrap_shape_creation(settings, shape): return utils.create_shape_from_serialization(shape) if getattr(settings,
|
||||
|
||||
Reference in New Issue
Block a user