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

Unified Diff: clang_format.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
« no previous file with comments | « chrome-update.py ('k') | commit_queue.py » ('j') | git_number.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: clang_format.py
diff --git a/clang_format.py b/clang_format.py
index 8320e6d2a0dc449d4e07cd82dcf3ab11b19c01c5..60f142dd514a0f6a24b8baf39e331e7ae3ab727d 100755
--- a/clang_format.py
+++ b/clang_format.py
@@ -62,8 +62,12 @@ def main(args):
if any(match in args for match in help_syntax):
print '\nDepot tools redirects you to the clang-format at:\n %s\n' % tool
- return subprocess.call([tool] + sys.argv[1:])
+ return subprocess.call([tool] + args)
if __name__ == '__main__':
- sys.exit(main(sys.argv))
+ try:
+ sys.exit(main(sys.argv[1]))
+ except KeyboardInterrupt:
+ print 'interrupted'
+ sys.exit(1)
« no previous file with comments | « chrome-update.py ('k') | commit_queue.py » ('j') | git_number.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698