mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Catch CalledProcessError which is throw if the command has non-zero exit code.
Review URL: https://codereview.chromium.org//13674014 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20992 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
6d1d524511
commit
76f2ff3197
1 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
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 '):
|
||||
|
|
Loading…
Reference in a new issue