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

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: 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..e9b8cd9b302d3d91ff57e99fccb0e26b8a9a86c9 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:
+ print 'interrupted'
+ sys.exit(1)

Powered by Google App Engine
This is Rietveld 408576698