Commits

Konstantin Lopuhin committed 2619035

fix "Too many open files" error when running under PyPy

Comments (0)

Files changed (1)

wheel/bdist_wheel.py

                     hash = ''
                     size = ''
                 else:
-                    data = open(path, 'rb').read()
+                    with open(path, 'rb') as f:
+                        data = f.read()
                     digest = hashlib.sha256(data).digest()
                     hash = 'sha256=' + native(urlsafe_b64encode(digest))
                     size = len(data)