update requirements

This commit is contained in:
David Lord 2021-12-22 14:26:34 -08:00
parent 624ed4de72
commit 9d36623db1
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
6 changed files with 44 additions and 43 deletions

View file

@ -714,7 +714,7 @@ def get_root_path(import_name: str) -> str:
# Module already imported and has a file attribute. Use that first.
mod = sys.modules.get(import_name)
if mod is not None and hasattr(mod, "__file__"):
if mod is not None and hasattr(mod, "__file__") and mod.__file__ is not None:
return os.path.dirname(os.path.abspath(mod.__file__))
# Next attempt: check the loader.