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

Unified Diff: tools/ninja.py

Issue 2725493002: Improve ctrl-C handling in ninja.py. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ninja.py
diff --git a/tools/ninja.py b/tools/ninja.py
index bf89dfc55a6177eecb6d22cc7c93962cde086e30..55d8d2ad8e4940de95e34a09febcf20939000f15 100755
--- a/tools/ninja.py
+++ b/tools/ninja.py
@@ -260,11 +260,14 @@ def RunOneBuildCommand(build_config, args):
def RunOneGomaBuildCommand(args):
- print ' '.join(args)
- process = subprocess.Popen(args, stdin=None)
- process.wait()
- print (' '.join(args) + " done.")
- return process.returncode
+ try:
+ print ' '.join(args)
+ process = subprocess.Popen(args, stdin=None)
+ process.wait()
+ print (' '.join(args) + " done.")
+ return process.returncode
+ except KeyboardInterrupt:
+ return 1
def Main():
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698