do not die on failing to load script #426

This commit is contained in:
AUTOMATIC 2022-09-14 13:20:24 +03:00
parent f6aa0cdb0b
commit c253d6bdab

View File

@ -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)