[issue22298] Lib/warnings.py _show_warning does not protect against being called with a file like object which is closed

Wolfgang Maier report at bugs.python.org
Wed Nov 23 12:29:55 EST 2016


Wolfgang Maier added the comment:

Issue23016 fixed the "AttributeError: 'NoneType' object has no attribute 'write'" problem when sys.stderr is None.
With that it's now possible and good practice to set sys.stderr = None when closing it, just as Antoine suggested.
Should this issue be closed then?

----------

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


More information about the Python-bugs-list mailing list