From 45f86d71484f0edb365d740cb8403ec1bc85d9d8 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Wed, 30 Mar 2022 19:34:00 +0200 Subject: [PATCH] test-runner: Replace exit with sys.exit exit comes from the site module which is "useful for the interactive interpreter shell and should not be used in programs." (https://docs.python.org/3/library/constants.html#constants-added-by-the-site-module) Replace with sys.exit(). I for an undefined error for exit in exit_vm(). --- tools/test-runner | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/test-runner b/tools/test-runner index b443d91e..81624953 100755 --- a/tools/test-runner +++ b/tools/test-runner @@ -300,7 +300,7 @@ class Process(subprocess.Popen): f = open(os.path.join(dir, file), mode) except Exception as e: traceback.print_exc() - exit(0) + sys.exit(0) if self.ctx.args.log_gid: os.fchown(f.fileno(), uid, gid) @@ -1545,11 +1545,11 @@ def run_auto_tests(ctx, args): os.chdir(tests[0]) os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = ctx.dbus_address os.system('/bin/bash') - exit() + sys.exit() if len(subtests) < 1: dbg("No tests to run") - exit() + sys.exit() rqueue = multiprocessing.Queue() p = multiprocessing.Process(target=start_test, args=(ctx, subtests, rqueue)) @@ -1994,7 +1994,7 @@ if __name__ == '__main__': prepare_sandbox() run_tests() - exit() + sys.exit() main = Main() main.start()