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

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: 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 | « drover.py ('k') | gcl.py » ('j') | git_number.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fetch.py
diff --git a/fetch.py b/fetch.py
index 5335f75a4419e283f0179e356e427668be49b0c8..bd84ab4d868b913f50d5b4d9518b6d52728e3512 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:
+ print 'interrupted'
+ sys.exit(1)
« no previous file with comments | « drover.py ('k') | gcl.py » ('j') | git_number.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698