Return an empty dict if the module cannot be loaded
This commit is contained in:
parent
d7f652bcc7
commit
d7d97b1b52
|
@ -60,7 +60,10 @@ def get_module_scripts(scriptmodule):
|
|||
return cls.full_name.split(".", maxsplit=1)[1]
|
||||
|
||||
loader = SourceFileLoader(get_python_name(scriptmodule), get_full_path(scriptmodule))
|
||||
module = loader.load_module()
|
||||
try:
|
||||
module = loader.load_module()
|
||||
except FileNotFoundError:
|
||||
return {}
|
||||
|
||||
scripts = {}
|
||||
ordered = getattr(module, 'script_order', [])
|
||||
|
|
Loading…
Reference in New Issue