1. Daniel Holth
  2. wheel

Commits

Konstantin Lopuhin  committed 2619035

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

  • Participants
  • Parent commits a160305
  • Branches fix-too-many-open-files

Comments (0)

Files changed (1)

File wheel/bdist_wheel.py

View file
                     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)