mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Handle KeyboardInterrupt during repo sync
If interrupt signal is sent to repo process while sync is running, repo prints stack trace for each concurrent job that is currently running with no useful information. Instead, this change captures KeyboardInterrupt in each process and prints one line about current project that is being processed. Change-Id: Ieca760ed862341939396b8186ae04128d769cd56 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357135 Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com>
This commit is contained in:
parent
dccf38e34f
commit
69427da8c9
@ -498,6 +498,8 @@ later is required to fix a server side protocol bug.
|
|||||||
print('error: Cannot fetch %s from %s'
|
print('error: Cannot fetch %s from %s'
|
||||||
% (project.name, project.remote.url),
|
% (project.name, project.remote.url),
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
|
except KeyboardInterrupt as e:
|
||||||
|
print(f'Keyboard interrupt while processing {project.name}')
|
||||||
except GitError as e:
|
except GitError as e:
|
||||||
print('error.GitError: Cannot fetch %s' % str(e), file=sys.stderr)
|
print('error.GitError: Cannot fetch %s' % str(e), file=sys.stderr)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user