diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-14 21:22:52 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-14 21:22:52 (GMT) |
commit | f7c24450bebabbe9870b1b306ca2d9257ec280c6 (patch) | |
tree | 842a1a1b551bf7a7b6c84bcf2dbaa8a78ce074af /Lib/sysconfig.py | |
parent | b67660fcceabd6cac7d4dea593db34bffa52dc98 (diff) | |
download | cpython-f7c24450bebabbe9870b1b306ca2d9257ec280c6.zip cpython-f7c24450bebabbe9870b1b306ca2d9257ec280c6.tar.gz cpython-f7c24450bebabbe9870b1b306ca2d9257ec280c6.tar.bz2 |
Merged revisions 85497 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85497 | antoine.pitrou | 2010-10-14 23:15:17 +0200 (jeu., 14 oct. 2010) | 3 lines
Explicitly close some files (from issue #10093)
........
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r-- | Lib/sysconfig.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 5d5d5c0..c40bb03 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -289,7 +289,8 @@ def _init_posix(vars): # load the installed pyconfig.h: config_h = get_config_h_filename() try: - parse_config_h(open(config_h), vars) + with open(config_h) as f: + parse_config_h(f, vars) except IOError, e: msg = "invalid Python installation: unable to open %s" % config_h if hasattr(e, "strerror"): |