mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Fix Ruff UP024 (os-error-alias)
https://docs.astral.sh/ruff/rules/os-error-alias/
This commit is contained in:
@@ -166,7 +166,7 @@ def open(
|
|||||||
f = ifcopenshell_wrapper.parse_ifcxml(str(path.absolute()))
|
f = ifcopenshell_wrapper.parse_ifcxml(str(path.absolute()))
|
||||||
if f:
|
if f:
|
||||||
return file(f)
|
return file(f)
|
||||||
raise IOError(f"Failed to parse .ifcXML file from {path}")
|
raise OSError(f"Failed to parse .ifcXML file from {path}")
|
||||||
if format == ".ifcZIP":
|
if format == ".ifcZIP":
|
||||||
with tempfile.TemporaryDirectory() as unzipped_path:
|
with tempfile.TemporaryDirectory() as unzipped_path:
|
||||||
with zipfile.ZipFile(path) as zf:
|
with zipfile.ZipFile(path) as zf:
|
||||||
|
|||||||
Reference in New Issue
Block a user