Commit c253d6bd authored by AUTOMATIC's avatar AUTOMATIC

do not die on failing to load script #426

parent f6aa0cdb
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment