[New-bugs-announce] [issue15960] logging.shutdown should cope with IO errors from handler.release methods
Nick Coghlan
report at bugs.python.org
Tue Sep 18 09:40:20 CEST 2012
New submission from Nick Coghlan:
logging.shutdown includes a try/except block to avoid emitting spurious IO errors while the interpreter is shutting down. This fails if a registered handler tries to do IO (such as calling flush()) in its release method.
It would be better if the flush-and-close block was written as:
try:
hr.acquire()
try:
hr.flush()
hr.close()
finally:
hr.release()
except (IOError, ValueError):
# Tolerate handlers that try to do IO in release()
----------
messages: 170635
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: logging.shutdown should cope with IO errors from handler.release methods
versions: Python 2.7, Python 3.2, Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15960>
_______________________________________
More information about the New-bugs-announce
mailing list