From c72527d6a5c8be469136a4d5cde62d63283e11d9 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 26 Apr 2022 13:33:53 +0100 Subject: [PATCH] runfvp: handle the fvp quitting before we kill it Don't raise an exception if the FVP has quit before we get around to killing it. Signed-off-by: Ross Burton Signed-off-by: Jon Mason --- scripts/runfvp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/runfvp b/scripts/runfvp index 524de24d..877e80cb 100755 --- a/scripts/runfvp +++ b/scripts/runfvp @@ -179,7 +179,10 @@ async def start_fvp(cli, console_cb): finally: # If we get cancelled or throw an exception, kill the FVP logger.debug(f"Killing FVP PID {fvp_process.pid}") - fvp_process.terminate() + try: + fvp_process.terminate() + except ProcessLookupError: + pass if await fvp_process.wait() != 0: logger.info(f"{cli[0]} quit with code {fvp_process.returncode}")