From: Éric Araujo Date: Fri, 15 Apr 2011 22:13:39 +0000 (+0200) Subject: Fix double use of f.close(). X-Git-Tag: v2.7.2rc1~85^2~1^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b22e17b2d617bef2fc00f5de29f5a4196f97a51c;p=python 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 77402d8ab7..3146f30510 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -639,7 +639,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