Skip to content

Commit f646683

Browse files
authored
Fix 'No such file or directory' when ctu.find_library don't find anything (#115)
Signed-off-by: justuser-31 <[email protected]>
1 parent 328ca53 commit f646683

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

oqs/oqs.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,17 @@ def _load_shared_obj(
8787
# os.environ["LD_LIBRARY_PATH"] += os.path.abspath(path)
8888

8989
# Search typical locations
90-
if found_lib := ctu.find_library(name):
91-
paths.insert(0, Path(found_lib))
90+
try:
91+
if found_lib := ctu.find_library(name):
92+
paths.insert(0, Path(found_lib))
93+
except:
94+
pass
9295

93-
if found_lib := ctu.find_library("lib" + name):
94-
paths.insert(0, Path(found_lib))
96+
try:
97+
if found_lib := ctu.find_library("lib" + name):
98+
paths.insert(0, Path(found_lib))
99+
except:
100+
pass
95101

96102
for path in paths:
97103
if path:

0 commit comments

Comments
 (0)