From: Vinay Sajip Date: Wed, 12 Apr 2006 10:02:00 +0000 (+0000) Subject: StreamHandler now checks explicitly for None before using sys.stderr as the stream... X-Git-Tag: v2.4.4c1~272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ae66c28e237f8657e0a74471d8dc75e5b263aa4;p=thirdparty%2FPython%2Fcpython.git 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 a7210e1a9c4f..07f1add37ace 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -706,7 +706,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