fix: Handle error while session start (#12933)

- The occurs randomly at the time of boot
This commit is contained in:
Suraj Shetty 2021-04-21 11:42:01 +05:30 committed by GitHub
parent 16f26d61bf
commit 87d8666c60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -975,7 +975,7 @@ def get_pymodule_path(modulename, *joins):
:param *joins: Join additional path elements using `os.path.join`."""
if not "public" in joins:
joins = [scrub(part) for part in joins]
return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__), *joins)
return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__ or ''), *joins)
def get_module_list(app_name):
"""Get list of modules for given all via `app/modules.txt`."""