mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
close the source's byte stream
This commit is contained in:
parent
1bd93a754f
commit
90b60a61d8
1 changed files with 3 additions and 0 deletions
|
|
@ -219,6 +219,9 @@ def close(self):
|
|||
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 = \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue