[Python-checkins] r85942 - python/branches/py3k/Lib/distutils/sysconfig.py
brett.cannon
python-checkins at python.org
Sat Oct 30 00:36:08 CEST 2010
Author: brett.cannon
Date: Sat Oct 30 00:36:08 2010
New Revision: 85942
Log:
Have distutils.sysconfig close a file to remove ResourceWarnings coming up
during the build from setup.py.
Modified:
python/branches/py3k/Lib/distutils/sysconfig.py
Modified: python/branches/py3k/Lib/distutils/sysconfig.py
==============================================================================
--- python/branches/py3k/Lib/distutils/sysconfig.py (original)
+++ python/branches/py3k/Lib/distutils/sysconfig.py Sat Oct 30 00:36:08 2010
@@ -413,7 +413,8 @@
# load the installed pyconfig.h:
try:
filename = get_config_h_filename()
- parse_config_h(io.open(filename), g)
+ with open(filename) as file:
+ parse_config_h(file, g)
except IOError as msg:
my_msg = "invalid Python installation: unable to open %s" % filename
if hasattr(msg, "strerror"):
More information about the Python-checkins
mailing list