From: Éric Araujo Date: Fri, 15 Apr 2011 22:13:39 +0000 (+0200) Subject: Fix double use of f.close(). X-Git-Tag: v3.2.1b1~71^2~4^2~1^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87f3a9aac7f4b324f10b23adb1e79ad6b69117ae;p=thirdparty%2FPython%2Fcpython.git 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). --- diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 685c84ea5ef9..3b0ca85fbbc1 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -694,7 +694,6 @@ def get_platform(): m = re.search( r'ProductUserVisibleVersion\s*' + r'(.*?)', f.read()) - f.close() if m is not None: macrelease = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour