[Python-checkins] cpython (2.7): Fix double use of f.close().

eric.araujo python-checkins at python.org
Mon May 2 13:39:09 CEST 2011


http://hg.python.org/cpython/rev/c02c78d93a2e
changeset:   69767:c02c78d93a2e
branch:      2.7
user:        Éric Araujo <merwok at netwok.org>
date:        Sat Apr 16 00:13:39 2011 +0200
summary:
  Fix double use of f.close().

The other one is in a finally block not seen in the diff, which I added
in 3bf86785cd9c (for #10252).

files:
  Lib/sysconfig.py |  1 -
  1 files changed, 0 insertions(+), 1 deletions(-)


diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -639,7 +639,6 @@
                     m = re.search(
                             r'<key>ProductUserVisibleVersion</key>\s*' +
                             r'<string>(.*?)</string>', f.read())
-                    f.close()
                     if m is not None:
                         macrelease = '.'.join(m.group(1).split('.')[:2])
                     # else: fall back to the default behaviour

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list