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 Suraj Shetty
parent b59eceb9a6
commit c28a7db70c

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`."""