mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
ifcopenshell.open - more robust file existence check
This commit is contained in:
@@ -158,7 +158,7 @@ def open(
|
|||||||
print(products[0] == model[122] == model["2XQ$n5SLP5MBLyL442paFx"]) # True
|
print(products[0] == model[122] == model["2XQ$n5SLP5MBLyL442paFx"]) # True
|
||||||
"""
|
"""
|
||||||
path = Path(path)
|
path = Path(path)
|
||||||
if not path.exists():
|
if not path.is_file():
|
||||||
raise FileNotFoundError(f"File does not exist: '{path}'.")
|
raise FileNotFoundError(f"File does not exist: '{path}'.")
|
||||||
if format is None:
|
if format is None:
|
||||||
format = guess_format(path)
|
format = guess_format(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user