From f1080a8278a84908ce23ffb1cb1f3e623a3e5da4 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 23 Dec 2024 16:19:45 +0500 Subject: [PATCH] ifcopenshell.open - more robust file existence check --- src/ifcopenshell-python/ifcopenshell/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index 63dfe88dfd..ee5ed67f48 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -158,7 +158,7 @@ def open( print(products[0] == model[122] == model["2XQ$n5SLP5MBLyL442paFx"]) # True """ path = Path(path) - if not path.exists(): + if not path.is_file(): raise FileNotFoundError(f"File does not exist: '{path}'.") if format is None: format = guess_format(path)