From 02af2a199b2ce9fa423cd4492360c74770abec42 Mon Sep 17 00:00:00 2001 From: Sergi Blanch Torne Date: Mon, 15 Sep 2025 15:34:22 +0200 Subject: [PATCH] ci,marge_queue: enhance script interruption Instead of printing an exception on the screen when the process is interrupted from the keyboard, handle it and print a more friendly message. Signed-off-by: Sergi Blanch Torne Part-of: --- bin/ci/marge_queue.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/ci/marge_queue.py b/bin/ci/marge_queue.py index ae530fbe1bf..65d5c379fcc 100755 --- a/bin/ci/marge_queue.py +++ b/bin/ci/marge_queue.py @@ -76,7 +76,11 @@ def main(): if not args.wait: sys.exit(min(n_mrs, 127)) - time.sleep(REFRESH_WAIT) + try: + time.sleep(REFRESH_WAIT) + except KeyboardInterrupt: + print("Sleep interrupted from keyboard, doing one last iteration before finish.") + args.wait = False if __name__ == "__main__":