ifcopenshell.file: improve missing attribute error msg

This commit is contained in:
Andrej730
2026-08-07 17:53:16 +05:00
parent dfc60196ec
commit 4d0e5f6aee
+1 -1
View File
@@ -698,7 +698,7 @@ class file_mixin:
if attr[0:6] == "create":
return functools.partial(self.create_entity, attr[6:])
else:
raise AttributeError
raise AttributeError(f"'file' object has no attribute '{attr}'.")
def __getitem__(self, key: Union[numbers.Integral, str, bytes]) -> ifcopenshell.entity_instance:
if isinstance(key, numbers.Integral):