From d93fe60e893435d9eb3a08dd59d92def40798e95 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Wed, 8 Jan 2025 18:31:46 +0000 Subject: [PATCH] sync: Handle KeyboardInterrupt during checkout KeyboardInterrupt is handled during NetworkHalf. This patch handles KeyboardInterrupt during LocalHalf. Bug: b/372069163 Change-Id: I26847f7ca3cdf1fe57b265b4f6b18cc8102d2921 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/447401 Tested-by: Josip Sokcevic Reviewed-by: Gavin Mak --- subcmds/sync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subcmds/sync.py b/subcmds/sync.py index 175748a6..3f1faa9f 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -1058,6 +1058,8 @@ later is required to fix a server side protocol bug. verbose=verbose, ) success = syncbuf.Finish() + except KeyboardInterrupt: + logger.error("Keyboard interrupt while processing %s", project.name) except GitError as e: logger.error( "error.GitError: Cannot checkout %s: %s", project.name, e