From 178611faa83871180f3ee52c4362a15c1c2d2e79 Mon Sep 17 00:00:00 2001 From: ArturTomczak Date: Wed, 25 Aug 2021 13:49:25 +0200 Subject: [PATCH] Finalizing Gsoc#45 ids checking (#1694) --- src/ifcopenshell-python/ifcopenshell/ids.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/ids.py b/src/ifcopenshell-python/ifcopenshell/ids.py index 769016b600..b3ac926a79 100644 --- a/src/ifcopenshell-python/ifcopenshell/ids.py +++ b/src/ifcopenshell-python/ifcopenshell/ids.py @@ -502,8 +502,10 @@ class entity(facet): :rtype: dict """ fac_dict = {"name": parameter_asdict(self.name)} - if "predefinedtype" in self: + try: fac_dict["predefinedtype"] = parameter_asdict(self.predefinedtype) + except (RecursionError, UnboundLocalError) as e: + print(e) return fac_dict def __call__(self, inst, logger):