diff options
author | Konstantin Lopuhin <kostia.lopuhin@gmail.com> | 2013-08-22 21:52:05 +0400 |
---|---|---|
committer | Konstantin Lopuhin <kostia.lopuhin@gmail.com> | 2013-08-22 21:52:05 +0400 |
commit | 2acca7af7c7083682643cb90c76fe6fce044b02a (patch) | |
tree | 3b4dd1c340cfad58d0e9181c2685fdb2aaa32628 | |
parent | 6a961ea10aca5af1a2fc770b41ab7a6bd324afe6 (diff) | |
download | wheel-fix-too-many-open-files.tar.gz |
fix "Too many open files" error when running under PyPyfix-too-many-open-files
-rw-r--r-- | wheel/bdist_wheel.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wheel/bdist_wheel.py b/wheel/bdist_wheel.py index db6e338..77d1752 100644 --- a/wheel/bdist_wheel.py +++ b/wheel/bdist_wheel.py @@ -432,7 +432,8 @@ class bdist_wheel(Command): 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) |