diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-05 20:10:38 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-05 20:10:38 (GMT) |
commit | cbdb705c887fb9c7feaa83ad93c365448926b110 (patch) | |
tree | 16f5352a5baf50ace4051644766db61c3805f537 /Lib | |
parent | ba687525c5cd03b1ba4384180d80fba828c84cf1 (diff) | |
download | cpython-cbdb705c887fb9c7feaa83ad93c365448926b110.zip cpython-cbdb705c887fb9c7feaa83ad93c365448926b110.tar.gz cpython-cbdb705c887fb9c7feaa83ad93c365448926b110.tar.bz2 |
Fixed bug #1557 by using popen.communicate() before popen.wait()
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/msvc9compiler.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py index a6cff2c..828d7fb 100644 --- a/Lib/distutils/msvc9compiler.py +++ b/Lib/distutils/msvc9compiler.py @@ -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 |