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

Unified Diff: git_upstream_diff.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_try.py ('k') | gn.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_upstream_diff.py
diff --git a/git_upstream_diff.py b/git_upstream_diff.py
index 9d9db95fd5d64bb1703f15dd38aa6c9270565370..3e38c780774e699e730b6fa3b94d618c6f8a48c9 100755
--- a/git_upstream_diff.py
+++ b/git_upstream_diff.py
@@ -38,8 +38,12 @@ def main(args):
cmd += extra_args
- subprocess2.check_call(cmd)
+ return subprocess2.check_call(cmd)
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_try.py ('k') | gn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698