Only fix weird path bug in windows

This commit is contained in:
James Betker 2021-08-05 22:21:25 -06:00
parent 70dcd1107f
commit 3ca51e80b2

View File

@ -37,6 +37,7 @@ def find_registered_model_fns(base_path='models'):
found_fns = {}
module_iter = pkgutil.walk_packages([base_path])
for mod in module_iter:
if os.name == 'nt':
if os.getcwd() not in mod.module_finder.path:
continue # I have no idea why this is necessary - I think it's a bug in the latest PyWindows release.
if mod.ispkg: