Merge pull request #2281 from cpennington/fix-i18n-execute

Use subprocess.STDOUT, rather than sys.STDOUT to rebind stderr
This commit is contained in:
Calen Pennington
2014-01-24 03:48:23 -08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ def call(command, working_directory=BASE_DIR):
"""
LOG.info(command)
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=working_directory)
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=working_directory, shell=True)
out, err = p.communicate()
return (out, err)

View File

@@ -39,7 +39,7 @@ def msgfmt_check_po_file(filename):
"""
# Use relative paths to make output less noisy.
rfile = os.path.relpath(filename, LOCALE_DIR)
out, err = call(['msgfmt', '-c', rfile], working_directory=LOCALE_DIR)
out, err = call('msgfmt -c {}'.format(rfile), working_directory=LOCALE_DIR)
if err != '':
log.info('\n' + out)
log.warn('\n' + err)