[Python-Dev] [Python-checkins] cpython (3.1): Closes #13807: Now checks for sys.stderr being there before writing to it. (original) (raw)

Meador Inge meadori at gmail.com
Fri Jan 20 16:02:24 CET 2012


On Fri, Jan 20, 2012 at 5:32 AM, vinay.sajip <python-checkins at python.org> wrote:

http://hg.python.org/cpython/rev/73dad4940b88 changeset:   74538:73dad4940b88 branch:      3.1

I thought that the 3.1 branch is in security mode? Is this a security related fix?

From my brief scan of the changeset, it doesn't seem to be.

parent:      74253:fb5707168351 user:        Vinay Sajip <vinaysajip at yahoo.co.uk> date:        Fri Jan 20 11:23:02 2012 +0000 summary:  Closes #13807: Now checks for sys.stderr being there before writing to it.

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 @@ -721,7 +721,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.excinfo() try: traceback.printexception(ei[0], ei[1], ei[2], None, sys.stderr) -- Repository URL: http://hg.python.org/cpython


Python-checkins mailing list Python-checkins at python.org http://mail.python.org/mailman/listinfo/python-checkins

--

Meador



More information about the Python-Dev mailing list