mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
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().
This commit is contained in:
parent
83299ef6aa
commit
45f86d7148
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user