Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2756)

Unified Diff: git_retry.py

Issue 955993006: Handle KeyboardInterrupt consistently in python scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: tweek test expectations Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: git_retry.py
diff --git a/git_retry.py b/git_retry.py
index b40e6d2ef8f49034342c74a312419189000c267e..d6dee6536bb8fdb8d11baf84b473f6235ddfb4cb 100755
--- a/git_retry.py
+++ b/git_retry.py
@@ -153,4 +153,8 @@ def main(args):
if __name__ == '__main__':
logging.basicConfig()
logging.getLogger().setLevel(logging.WARNING)
- sys.exit(main(sys.argv[2:]))
+ try:
+ sys.exit(main(sys.argv[2:]))
+ except KeyboardInterrupt:
+ sys.stderr.write('interrupted\n')
+ sys.exit(1)
« clang_format.py ('K') | « git_reparent_branch.py ('k') | git_squash_branch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698