mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
Made ifc.py compatible with python2
This commit is contained in:
+2
-2
@@ -4,9 +4,9 @@ import ifc_wrapper
|
|||||||
|
|
||||||
if hasattr(functools, 'reduce'): reduce = functools.reduce
|
if hasattr(functools, 'reduce'): reduce = functools.reduce
|
||||||
|
|
||||||
class entity_instance:
|
class entity_instance(object):
|
||||||
def __init__(self, e):
|
def __init__(self, e):
|
||||||
super().__setattr__('wrapped_data', e)
|
super(entity_instance,self).__setattr__('wrapped_data', e)
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
try: return entity_instance.wrap_value(self.wrapped_data.get_argument(self.wrapped_data.get_argument_index(name)))
|
try: return entity_instance.wrap_value(self.wrapped_data.get_argument(self.wrapped_data.get_argument_index(name)))
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user