[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

STINNER Victor report at bugs.python.org
Fri May 5 03:32:39 EDT 2017


STINNER Victor added the comment:

> I made one design choice: the close() method of byte and character streams are called twice, I didn't call setByteStream(None) / setCharacterStream(None) to avoid creating an inconsistent source. If you really care, maybe we can reset the source to a new xmlreader.InputSource() object instead.

Hum, I just modified my PR one more time to replace try/finally: self._close_source() with "try/except: self._close_source(); raise", so file.close() is now only called once.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30264>
_______________________________________


More information about the Python-bugs-list mailing list