Skip to content

Commit bb39c23

Browse files
committed
Allow for OSError when checking if built module exists.
1 parent 3f9c5f7 commit bb39c23

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cppimport/importer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ def build_safely(filepath, module_data):
2323
lock_path = binary_path + cppimport.settings["lock_suffix"]
2424

2525
def build_completed():
26-
return os.path.exists(binary_path) and is_checksum_valid(module_data)
26+
try:
27+
return os.path.exists(binary_path) and is_checksum_valid(module_data)
28+
except OSError:
29+
return False
2730

2831
t = time()
2932

0 commit comments

Comments
 (0)