diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-10-31 20:03:32 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-10-31 20:03:32 (GMT) |
commit | 90b60a61d8aeeaa0f4c945965d559bab2fb26101 (patch) | |
tree | 1b571e2817504f649363407d2699b83ab6ca948a /Lib | |
parent | 1bd93a754fc0f9a801c982ab1bb3a8ee0d9d77b6 (diff) | |
download | cpython-90b60a61d8aeeaa0f4c945965d559bab2fb26101.zip cpython-90b60a61d8aeeaa0f4c945965d559bab2fb26101.tar.gz cpython-90b60a61d8aeeaa0f4c945965d559bab2fb26101.tar.bz2 |
close the source's byte stream
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/xml/sax/expatreader.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py index c9fc894..a227cda 100644 --- a/Lib/xml/sax/expatreader.py +++ b/Lib/xml/sax/expatreader.py @@ -219,6 +219,9 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator): 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 = \ |