aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-07-04 12:32:15 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-07-04 12:32:15 -0700
commit6335ad37c27d21780e3b4c25698db1282415a4d0 (patch)
treeab1b79c91269f7ea118a34b8c2d5a48687cbf212 /tools/shared.py
parent4b0724583b7da6bab1273459df70c4273ce2431b (diff)
do not eat stderr when running js optimizer
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 6d73588a..e0ed3707 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -834,8 +834,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e
if type(passes) == str:
passes = [passes]
# XXX Disable crankshaft to work around v8 bug 1895
- output, err = Popen([NODE_JS, '--nocrankshaft', JS_OPTIMIZER, filename] + passes, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
- assert len(output) > 0 and not output.startswith('Assertion failed'), 'Error in js optimizer: ' + err + '\n\n' + output
+ output = Popen([NODE_JS, '--nocrankshaft', JS_OPTIMIZER, filename] + passes, stdout=PIPE).communicate()[0]
+ assert len(output) > 0 and not output.startswith('Assertion failed'), 'Error in js optimizer: ' + output
filename += '.jo.js'
f = open(filename, 'w')
f.write(output)
@@ -850,8 +850,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e
coffee = path_from_root('tools', 'eliminator', 'node_modules', 'coffee-script', 'bin', 'coffee')
eliminator = path_from_root('tools', 'eliminator', 'eliminator.coffee')
input = open(filename, 'r').read()
- output, err = Popen([NODE_JS, coffee, eliminator], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate(input)
- assert len(output) > 0, 'Error in eliminator: ' + err + '\n\n' + output
+ output = Popen([NODE_JS, coffee, eliminator], stdin=PIPE, stdout=PIPE).communicate(input)[0]
+ assert len(output) > 0, 'Error in eliminator: ' + output
filename += '.el.js'
f = open(filename, 'w')
f.write(output)