Commits

Anonymous committed 478bc4f

use 'with' syntax for opening file

Comments (0)

Files changed (1)

lib-python/modified-2.7/distutils/command/bdist_wininst.py

                              bitmaplen,        # number of bytes in bitmap
                              )
         file.write(header)
-        file.write(open(arcname, "rb").read())
+        with open(arcname, "rb") as arcfile:
+            file.write(arcfile.read())
 
     # create_exe()