diff --git a/tests/scripts/test_run_molecule_scenarios.py b/tests/scripts/test_run_molecule_scenarios.py index 4a5d005..eff52ea 100644 --- a/tests/scripts/test_run_molecule_scenarios.py +++ b/tests/scripts/test_run_molecule_scenarios.py @@ -353,7 +353,7 @@ def alive(pid): """Whether pid is a running process, not gone or a zombie.""" try: stat = pathlib.Path(f"/proc/{pid}/stat").read_text() - except FileNotFoundError: + except (FileNotFoundError, ProcessLookupError): # gone before or during the read return False return stat.rsplit(")", 1)[1].split()[0] != "Z"