diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-01-20 11:23:02 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-01-20 11:23:02 (GMT) |
commit | 889bb2969d00a548279c7e4dd237c23b100548e2 (patch) | |
tree | 002adf2e28fd4167e0601ec26cedbf793bb351b1 /Lib/logging/__init__.py | |
parent | b462da8c0a5b0d9986b256fd8997f6e28616fb29 (diff) | |
download | cpython-889bb2969d00a548279c7e4dd237c23b100548e2.zip cpython-889bb2969d00a548279c7e4dd237c23b100548e2.tar.gz cpython-889bb2969d00a548279c7e4dd237c23b100548e2.tar.bz2 |
Closes #13807: Now checks for sys.stderr being there before writing to it.
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 685efeb..f70dfb5 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -721,7 +721,7 @@ class Handler(Filterer): You could, however, replace this with a custom handler if you wish. The record which was being processed is passed in to this method. """ - if raiseExceptions: + if raiseExceptions and sys.stderr: # see issue 13807 ei = sys.exc_info() try: traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr) |