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

Unified Diff: chrome-update.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
« no previous file with comments | « apply_issue.py ('k') | clang_format.py » ('j') | clang_format.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome-update.py
diff --git a/chrome-update.py b/chrome-update.py
index 4f5731cb4d7c7c133645fbcdca368c61a5ec5152..4fb11e5aba2578d2b99d146d1c171942264a0d54 100755
--- a/chrome-update.py
+++ b/chrome-update.py
@@ -60,7 +60,7 @@ def DoBuild(chrome_root, args):
return subprocess.call(cmd, cwd=chrome_root, shell=IS_WIN)
-def Main(args):
+def main(args):
if len(args) < 3:
print('Usage: chrome-update.py <path> [options]')
print('See options from compile.py at')
@@ -84,4 +84,8 @@ def Main(args):
if __name__ == "__main__":
- sys.exit(Main(sys.argv))
+ try:
+ sys.exit(main(sys.argv))
+ except KeyboardInterrupt:
+ sys.stderr.write('interrupted\n')
+ sys.exit(1)
« no previous file with comments | « apply_issue.py ('k') | clang_format.py » ('j') | clang_format.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698