[Python-checkins] r86062 - python/branches/py3k/Lib/xml/sax/expatreader.py
benjamin.peterson
python-checkins at python.org
Sun Oct 31 21:03:32 CET 2010
Author: benjamin.peterson
Date: Sun Oct 31 21:03:32 2010
New Revision: 86062
Log:
close the source's byte stream
Modified:
python/branches/py3k/Lib/xml/sax/expatreader.py
Modified: python/branches/py3k/Lib/xml/sax/expatreader.py
==============================================================================
--- python/branches/py3k/Lib/xml/sax/expatreader.py (original)
+++ python/branches/py3k/Lib/xml/sax/expatreader.py Sun Oct 31 21:03:32 2010
@@ -219,6 +219,9 @@
self._parsing = 0
# break cycle created by expat handlers pointing to our methods
self._parser = None
+ bs = self._source.getByteStream()
+ if bs is not None:
+ bs.close()
def _reset_cont_handler(self):
self._parser.ProcessingInstructionHandler = \
More information about the Python-checkins
mailing list