Skip to content

Instantly share code, notes, and snippets.

@comewalk
Created March 13, 2013 10:30
Show Gist options
  • Save comewalk/5150900 to your computer and use it in GitHub Desktop.
Save comewalk/5150900 to your computer and use it in GitHub Desktop.
$ python26 -V Python 2.6.8 $ java -version java version "1.6.0_18" Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode) I ran closurebuilder.py in above environment. I got a following error. (paths tweaked a little though.) I fixed this patch. closure-library/closure/bin/build/closur…
--- closure-library/closure/bin/build/jscompiler.py 2013-03-13 18:21:16.000000000 +0900
+++ closure-library/closure/bin/build/jscompiler.py 2013-03-13 19:22:12.000000000 +0900
@@ -33,7 +33,7 @@
def _GetJavaVersionString():
"""Get the version string from the Java VM."""
- return subprocess.check_output(['java', '-version'], stderr=subprocess.STDOUT)
+ return subprocess.Popen(['java', '-version'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]
def _ParseJavaVersion(version_string):
@@ -110,6 +110,6 @@
logging.info('Compiling with the following command: %s', ' '.join(args))
try:
- return subprocess.check_output(args)
+ return subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]
except subprocess.CalledProcessError:
raise JsCompilerError('JavaScript compilation failed.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment