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

eric.araujo python-checkins at python.org
Wed Apr 27 16:38:05 CEST 2011


http://hg.python.org/cpython/rev/85fefd41ef5d
changeset:   69606:85fefd41ef5d
branch:      3.2
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
@@ -694,7 +694,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