Commit e84e72f9 authored by Éric Araujo's avatar Éric Araujo

Merged revisions 86274,86276 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86274 | eric.araujo | 2010-11-06 16:57:52 +0100 (sam., 06 nov. 2010) | 2 lines

  Correct the fix for #10252: Popen objects have no close method.
........
  r86276 | eric.araujo | 2010-11-06 19:03:52 +0100 (sam., 06 nov. 2010) | 2 lines

  Fix #10252 again (hopefully definitely).  Patch by Brian Curtin.
........
parent b89e4fc4
...@@ -267,8 +267,6 @@ def query_vcvarsall(version, arch="x86"): ...@@ -267,8 +267,6 @@ def query_vcvarsall(version, arch="x86"):
stdout, stderr = popen.communicate() stdout, stderr = popen.communicate()
if popen.wait() != 0: if popen.wait() != 0:
raise DistutilsPlatformError(stderr.decode("mbcs")) raise DistutilsPlatformError(stderr.decode("mbcs"))
finally:
popen.close()
stdout = stdout.decode("mbcs") stdout = stdout.decode("mbcs")
for line in stdout.split("\n"): for line in stdout.split("\n"):
...@@ -283,6 +281,11 @@ def query_vcvarsall(version, arch="x86"): ...@@ -283,6 +281,11 @@ def query_vcvarsall(version, arch="x86"):
value = value[:-1] value = value[:-1]
result[key] = removeDuplicates(value) result[key] = removeDuplicates(value)
finally:
popen.stdin.close()
popen.stdout.close()
popen.stderr.close()
if len(result) != len(interesting): if len(result) != len(interesting):
raise ValueError(str(list(result.keys()))) raise ValueError(str(list(result.keys())))
......
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