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

Unified Diff: dart/tools/build.py

Issue 13674014: Catch CalledProcessError which is throw if the command has non-zero exit code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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: dart/tools/build.py
diff --git a/dart/tools/build.py b/dart/tools/build.py
index f7ad04575bbbd784da0d671346e537bd671ae060..886749f6ef77e868f687e1571867cc989ebdffca 100755
--- a/dart/tools/build.py
+++ b/dart/tools/build.py
@@ -266,9 +266,13 @@ PhaseScriptExecution "Action \"upload_sdk_py\"" xcodebuild/dart.build/...
term = os.getenv('TERM', 'dumb')
# The capability "clr_eol" means clear the line from cursor to end
# of line. See man pages for tput and terminfo.
- clr_eol = subprocess.check_output(['tput', '-T' + term, 'el'])
- if clr_eol:
- is_fancy_tty = True
+ try:
+ clr_eol = subprocess.check_output(['tput', '-T' + term, 'el'],
+ stderr=subprocess.STDOUT)
kustermann 2013/04/06 14:31:05 I don't understand why you added 'stderr=subproces
ahe 2013/04/08 12:46:29 tput is a well-behaved Unix command. It doesn't p
+ if clr_eol:
+ is_fancy_tty = True
+ except subprocess.CalledProcessError:
+ is_fancy_tty = False
for line in unbuffered(process.stdout.readline):
line = line.rstrip()
if line.startswith('=== BUILD ') or line.startswith('** BUILD '):
« 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