[Python-checkins] r59370 - python/trunk/Lib/distutils/msvc9compiler.py
christian.heimes
python-checkins at python.org
Wed Dec 5 21:10:38 CET 2007
Author: christian.heimes
Date: Wed Dec 5 21:10:38 2007
New Revision: 59370
Modified:
python/trunk/Lib/distutils/msvc9compiler.py
Log:
Fixed bug #1557 by using popen.communicate() before popen.wait()
Modified: python/trunk/Lib/distutils/msvc9compiler.py
==============================================================================
--- python/trunk/Lib/distutils/msvc9compiler.py (original)
+++ python/trunk/Lib/distutils/msvc9compiler.py Wed Dec 5 21:10:38 2007
@@ -254,10 +254,13 @@
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
More information about the Python-checkins
mailing list