diff options
-rw-r--r-- | modules/scripts.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/scripts.py b/modules/scripts.py index 74591bab..de8c5fc3 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -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)
|