Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when trying to print a traceback.

This commit is contained in:
Vinay Sajip 2009-05-09 12:11:30 +00:00
parent 26f3255774
commit 28274ab6cf
2 changed files with 9 additions and 2 deletions

View file

@ -720,8 +720,12 @@ class Handler(Filterer):
""" """
if raiseExceptions: if raiseExceptions:
ei = sys.exc_info() ei = sys.exc_info()
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr) try:
del ei traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
except IOError:
pass # see issue 5971
finally:
del ei
class StreamHandler(Handler): class StreamHandler(Handler):
""" """

View file

@ -40,6 +40,9 @@ Core and Builtins
Library Library
------- -------
- Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when
trying to print a traceback.
- Issue 5955: aifc's close method did not close the file it wrapped, - Issue 5955: aifc's close method did not close the file it wrapped,
now it does. This also means getfp method now returns the real fp. now it does. This also means getfp method now returns the real fp.