From 0e300c6a40a26c4408276d375e30dd3e2000406f Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Sun, 2 Mar 2025 17:06:24 +0100 Subject: [PATCH] lint --- acceptance/bin/wait_pid.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/acceptance/bin/wait_pid.py b/acceptance/bin/wait_pid.py index 989d4414d..35bc0eedd 100755 --- a/acceptance/bin/wait_pid.py +++ b/acceptance/bin/wait_pid.py @@ -5,11 +5,12 @@ import time import platform import subprocess + def is_finished_windows(pid): assert int(pid) > 0 # Run task list but filter the list by pid.. - output = subprocess.check_output(f"tasklist /fi \"PID eq {pid}\"", text=True) + output = subprocess.check_output(f'tasklist /fi "PID eq {pid}"', text=True) # If tasklist does not find any process, that means the process we are # waiting for has terminated. @@ -19,6 +20,7 @@ def is_finished_windows(pid): return False + def is_finished_unix(pid): assert int(pid) > 0 @@ -54,9 +56,9 @@ def wait_pid(pid): time.sleep(sleep_time) - print(f"Timeout: Process {pid} did not end within 1 minute") return 1 + exit_code = wait_pid(int(sys.argv[1])) sys.exit(exit_code)