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

Unified Diff: git_footers.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
« clang_format.py ('K') | « git_cl.py ('k') | git_freezer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_footers.py
diff --git a/git_footers.py b/git_footers.py
index f3b2482a08958abf41aad1331a7217d2da9ee5a0..01a4cd5805180a4bd025aa9baf62c64ba5c5a8e8 100755
--- a/git_footers.py
+++ b/git_footers.py
@@ -139,7 +139,12 @@ def main(args):
for k in footers.keys():
for v in footers[k]:
print '%s: %s' % (k, v)
+ return 0
if __name__ == '__main__':
- 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_cl.py ('k') | git_freezer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698