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

Unified Diff: tools/dom/dom.py

Issue 13464023: Fixed an issue with subprocess.call. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/dom/dom.py
diff --git a/tools/dom/dom.py b/tools/dom/dom.py
index 458d39ce6cb008aadfa9ca480f3ef9b0d3ccb510..d9e75886ea9a689550369cb2af917160d6d95332 100755
--- a/tools/dom/dom.py
+++ b/tools/dom/dom.py
@@ -156,9 +156,13 @@ def test_dart2js(browser, argv):
def call(args):
print ' '.join(args)
- return subprocess.call(args,
- stdout=subprocess.STDOUT,
- stderr=subprocess.STDERR)
+ pipe = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ output, error = pipe.communicate()
+ if output:
+ print output
+ if error:
+ print error
+ return pipe.returncode
def init_dir():
''' Makes sure that we're always rooted in the dart root folder.'''
@@ -202,7 +206,8 @@ def main(argv):
help();
success = False
break
- success = success and bool(commands[command][0]())
+ returncode = commands[command][0]()
+ success = success and not bool(returncode)
sys.exit(not success)
« 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