Fix broken packages on package importlib detection failed the entire requirements detection

This commit is contained in:
allegroai 2021-01-24 09:06:17 +02:00
parent 29a5df407f
commit fef2ddb43a

View File

@ -309,6 +309,9 @@ def is_std_or_local_lib(name):
module_info = importlib.util.find_spec(name) # noqa
except ImportError:
exist = False
except ValueError:
# if we got here, the loader failed on us, meaning this is definitely a module and not std
return False
mpath = module_info.origin if module_info else None
if exist and mpath is not None: