mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 14:06:26 +00:00
ifcopenshell.file: improve missing attribute error msg
This commit is contained in:
@@ -698,7 +698,7 @@ class file_mixin:
|
|||||||
if attr[0:6] == "create":
|
if attr[0:6] == "create":
|
||||||
return functools.partial(self.create_entity, attr[6:])
|
return functools.partial(self.create_entity, attr[6:])
|
||||||
else:
|
else:
|
||||||
raise AttributeError
|
raise AttributeError(f"'file' object has no attribute '{attr}'.")
|
||||||
|
|
||||||
def __getitem__(self, key: Union[numbers.Integral, str, bytes]) -> ifcopenshell.entity_instance:
|
def __getitem__(self, key: Union[numbers.Integral, str, bytes]) -> ifcopenshell.entity_instance:
|
||||||
if isinstance(key, numbers.Integral):
|
if isinstance(key, numbers.Integral):
|
||||||
|
|||||||
Reference in New Issue
Block a user