Skip to content

Commit cf625f9

Browse files
authored
[FIX] Running python on metacall windows works (#341)
Used to cause an OSError due to ctypes trying to load a dll which didnt exist
1 parent 5038d74 commit cf625f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/ports/py_port/metacall/module_win32.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def get_loaded_module(modules, module_name):
6767

6868
for name in library_names:
6969
runtime_module_handle = get_loaded_module(modules, os.path.join(os.path.sep, base_path, name + '.dll'))
70+
if runtime_module_handle is None:
71+
continue
7072
runtime_module = ctypes.CDLL('', handle = runtime_module_handle) # cdecl calling convention
7173

7274
if runtime_module != None:

0 commit comments

Comments
 (0)