From: Vinay Sajip Date: Tue, 11 Apr 2006 21:42:00 +0000 (+0000) Subject: StreamHandler now checks explicitly for None before using sys.stderr as the stream... X-Git-Tag: v2.5a2~326 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=502348d010be73a20cd5d6ce5512746198baa711;p=python StreamHandler now checks explicitly for None before using sys.stderr as the stream (see SF bug #1463840). --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index bc215439b4..582b781bc7 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -719,7 +719,7 @@ class StreamHandler(Handler): If strm is not specified, sys.stderr is used. """ Handler.__init__(self) - if not strm: + if strm is None: strm = sys.stderr self.stream = strm self.formatter = None