From 87d8666c60bfdf3ea6c1ef375a99cb9db8bd3a2c Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Wed, 21 Apr 2021 11:42:01 +0530 Subject: [PATCH] fix: Handle error while session start (#12933) - The occurs randomly at the time of boot --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index cab9b0da76..55cafa917a 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -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`."""