[issue10252] Fix resource warnings in distutils

Éric Araujo report at bugs.python.org
Fri Nov 19 17:13:07 CET 2010


Éric Araujo <merwok at netwok.org> added the comment:

These constructs don’t generate warnings at present but should IMO use the with statement too:

./distutils/command/upload.py:128:                                     open(filename+".asc").read())
./distutils/command/bdist_rpm.py:514:                    spec_file.extend(open(val, 'r').read().split('\n'))
./distutils/command/bdist_wininst.py:248:            bitmapdata = open(bitmap, "rb").read()
./distutils/command/bdist_wininst.py:288:        file.write(open(arcname, "rb").read())
./distutils/command/bdist_msi.py:399:            f.write(open(self.pre_install_script).read())

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10252>
_______________________________________


More information about the Python-bugs-list mailing list