do not die on failing to load script #426
This commit is contained in:
parent
f6aa0cdb0b
commit
c253d6bdab
|
@ -42,10 +42,10 @@ def load_scripts(basedir):
|
|||
if not os.path.isfile(path):
|
||||
continue
|
||||
|
||||
with open(path, "r", encoding="utf8") as file:
|
||||
text = file.read()
|
||||
|
||||
try:
|
||||
with open(path, "r", encoding="utf8") as file:
|
||||
text = file.read()
|
||||
|
||||
from types import ModuleType
|
||||
compiled = compile(text, path, 'exec')
|
||||
module = ModuleType(filename)
|
||||
|
|
Loading…
Reference in New Issue
Block a user