Commit c03780a3 authored by Christian Heimes's avatar Christian Heimes

Fixed bug #1557 by using popen.communicate() before popen.wait()

parent 83cd6eee
......@@ -254,10 +254,13 @@ def query_vcvarsall(version, arch="x86"):
popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = popen.communicate()
if popen.wait() != 0:
raise IOError(popen.stderr.read())
raise IOError(stderr.decode("mbcs"))
for line in popen.stdout:
stdout = stdout.decode("mbcs")
for line in stdout.split("\n"):
line = Reg.convert_mbcs(line)
if '=' not in line:
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment