Fix python3 parsing of subprocess output
As described in the python docs, use "universal_newlines" to subprocess so the output are text streams. With this, tox -e py34 works Change-Id: I79091ed98054f25414d99824ee686bdf38ab968e
This commit is contained in:
parent
0661da9c91
commit
28a2f9b995
@ -173,7 +173,8 @@ def check_syntax(filename, report):
|
|||||||
bash_environment['LC_ALL'] = 'C'
|
bash_environment['LC_ALL'] = 'C'
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
['bash', '-n', filename], stdout=subprocess.PIPE,
|
['bash', '-n', filename], stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE, env=bash_environment)
|
stderr=subprocess.PIPE, env=bash_environment,
|
||||||
|
universal_newlines=True)
|
||||||
outputs = proc.communicate()
|
outputs = proc.communicate()
|
||||||
|
|
||||||
for line in outputs[1].split('\n'):
|
for line in outputs[1].split('\n'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user