[Python-checkins] cpython (merge 3.1 -> 3.2): Closes #13807: Merged fix from 3.1.

vinay.sajip python-checkins at python.org
Fri Jan 20 12:32:13 CET 2012


http://hg.python.org/cpython/rev/6a1a33a1fe93
changeset:   74539:6a1a33a1fe93
branch:      3.2
parent:      74535:b22a35c14a91
parent:      74538:73dad4940b88
user:        Vinay Sajip <vinay_sajip at yahoo.co.uk>
date:        Fri Jan 20 11:27:36 2012 +0000
summary:
  Closes #13807: Merged fix from 3.1.

files:
  Lib/logging/__init__.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -881,7 +881,7 @@
         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],

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list