diff --git a/sat/core/launcher.py b/sat/core/launcher.py index fd86bae2..26921eb2 100644 --- a/sat/core/launcher.py +++ b/sat/core/launcher.py @@ -23,7 +23,6 @@ import os import argparse from pathlib import Path from configparser import ConfigParser -from os.path import expanduser, join from twisted.application import app from twisted.python import usage from sat.core.constants import Const as C @@ -100,7 +99,7 @@ class Launcher: print(f"Still waiting for {self.APP_NAME} to be terminated…") elif state == 'waiting' and now - kill_started > 10: state == 'killing' - print(f"Waiting for too long, we kill the process") + print("Waiting for too long, we kill the process") os.kill(pid, signal.SIGKILL) sys.exit(1) @@ -233,6 +232,10 @@ class Launcher: runner.run() if runner._exitSignal is not None: app._exitWithSignal(runner._exitSignal) + try: + sys.exit(app._exitCode) + except AttributeError: + pass @classmethod def run(cls):