Skip to content

Commit 90b60a6

Browse files
committed
close the source's byte stream
1 parent 1bd93a7 commit 90b60a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/xml/sax/expatreader.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ def close(self):
219219
self._parsing = 0
220220
# break cycle created by expat handlers pointing to our methods
221221
self._parser = None
222+
bs = self._source.getByteStream()
223+
if bs is not None:
224+
bs.close()
222225

223226
def _reset_cont_handler(self):
224227
self._parser.ProcessingInstructionHandler = \

0 commit comments

Comments
 (0)