Handle SystemExit
@@ -50,16 +50,18 @@ def runScriptAtPath(path):
script = importlib.util.module_from_spec(spec)
spec.loader.exec_module(script)
PytoClasses.Python.shared.values = [item for item in dir(script) if not item.startswith("__")]
+ except SystemExit:
+ print("SystemExit")
+ except:
+ print(traceback.format_exc())
+
+ sys.path.remove(directory)
PytoClasses.ReviewHelper.shared.launches = PytoClasses.ReviewHelper.shared.launches+1
PytoClasses.ReviewHelper.shared.requestReview()
PytoClasses.Python.shared.isScriptRunning = False
PytoClasses.ConsoleViewController.ignoresInput = True
- except:
- print(traceback.format_exc())
-
- sys.path.remove(directory)
thread = threading.Thread(target=run, args=())
