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

Unified Diff: git_cl.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_cl.py
diff --git a/git_cl.py b/git_cl.py
index 728bae7abcf41c980e58db900554f3c9fbb58fe4..fd3662d977e876306e4f682b6ddecb4e7aaf7e4f 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3071,6 +3071,7 @@ def main(argv):
DieWithError(
('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
+ return 0
if __name__ == '__main__':
@@ -3078,4 +3079,8 @@ if __name__ == '__main__':
# unit testing.
fix_encoding.fix_encoding()
colorama.init()
- sys.exit(main(sys.argv[1:]))
+ try:
+ sys.exit(main(sys.argv[1:]))
+ except KeyboardInterrupt:
+ sys.stderr.write('interrupted\n')
+ sys.exit(1)
« clang_format.py ('K') | « git_cherry_pick_upload.py ('k') | git_footers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698