Merged revisions 86223-86224,86226,86234 via svnmerge from

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

........
  r86223 | eric.araujo | 2010-11-06 00:51:56 +0100 (sam., 06 nov. 2010) | 2 lines

  Always close files in distutils code and tests (#10252).
........
  r86224 | eric.araujo | 2010-11-06 00:58:34 +0100 (sam., 06 nov. 2010) | 2 lines

  Add missing entry for r86223.
........
  r86226 | eric.araujo | 2010-11-06 00:59:32 +0100 (sam., 06 nov. 2010) | 2 lines

  Of course, I forgot one file in r86223.
........
  r86234 | eric.araujo | 2010-11-06 03:10:32 +0100 (sam., 06 nov. 2010) | 2 lines

  Also close file descriptors from os.popen and subprocess.Popen
........
This commit is contained in:
Éric Araujo 2010-11-06 02:58:56 +00:00
parent 997980fe13
commit c6d7ead095
27 changed files with 283 additions and 185 deletions

View file

@ -76,7 +76,11 @@ class upload(PyPIRCCommand):
# Fill in the data - send all the meta-data in case we need to
# register a new release
content = open(filename,'rb').read()
f = open(filename,'rb')
try:
content = f.read()
finally:
f.close()
meta = self.distribution.metadata
data = {
# action