[Zope-Checkins] CVS: Zope3/lib/python/Zope/Configuration - xmlconfig.py:1.1.2.9
Chris Withers
chrisw@nipltd.com
Thu, 21 Feb 2002 17:28:12 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Configuration
In directory cvs.zope.org:/tmp/cvs-serv30995
Modified Files:
Tag: Zope-3x-branch
xmlconfig.py
Log Message:
Add explicit close for opened files.
It appears that the files were being leaked and thus
not closed right away.
=== Zope3/lib/python/Zope/Configuration/xmlconfig.py 1.1.2.8 => 1.1.2.9 ===
self._stack=[file_name]
xmlconfig(f, self._actions, tuple(self._stack), self._directives)
+ f.close()
def include(self, file, package=None):
if package is not None:
@@ -212,6 +213,7 @@
self._stack.append(file_name)
xmlconfig(f, self._actions, tuple(self._stack), self._directives)
self._stack.pop()
+ f.close()
return ()
def __call__(self):