[pypy-commit] pypy default: Missing f.close().
arigo
noreply at buildbot.pypy.org
Wed Nov 9 18:14:07 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r49029:36f8f2531dfe
Date: 2011-11-09 17:46 +0100
http://bitbucket.org/pypy/pypy/changeset/36f8f2531dfe/
Log: Missing f.close().
diff --git a/lib-python/2.7/pkgutil.py b/lib-python/modified-2.7/pkgutil.py
copy from lib-python/2.7/pkgutil.py
copy to lib-python/modified-2.7/pkgutil.py
--- a/lib-python/2.7/pkgutil.py
+++ b/lib-python/modified-2.7/pkgutil.py
@@ -244,7 +244,8 @@
return mod
def get_data(self, pathname):
- return open(pathname, "rb").read()
+ with open(pathname, "rb") as f:
+ return f.read()
def _reopen(self):
if self.file and self.file.closed:
More information about the pypy-commit
mailing list