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

Unified Diff: fetch.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') | « drover.py ('k') | gcl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fetch.py
diff --git a/fetch.py b/fetch.py
index 5335f75a4419e283f0179e356e427668be49b0c8..04be95fa48ea0d095692a321c0e6b14ec5fedb57 100755
--- a/fetch.py
+++ b/fetch.py
@@ -331,4 +331,8 @@ def main():
if __name__ == '__main__':
- sys.exit(main())
+ try:
+ sys.exit(main())
+ except KeyboardInterrupt:
+ sys.stderr.write('interrupted\n')
+ sys.exit(1)
« clang_format.py ('K') | « drover.py ('k') | gcl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698