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,8 +37,9 @@ def find_registered_model_fns(base_path='models'):
found_fns = {}
module_iter = pkgutil.walk_packages([base_path])
for mod in module_iter:
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 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:
EXCLUSION_LIST = ['flownet2']
if mod.name not in EXCLUSION_LIST: