]> granicus.if.org Git - python/commitdiff
Change to LogRecord.__init__() to fix #1206. Note that archaic use of type(x) ==...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 27 Sep 2007 07:35:10 +0000 (07:35 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 27 Sep 2007 07:35:10 +0000 (07:35 +0000)
Lib/logging/__init__.py

index 9299b8f52e6c2e6869928b28718d258b1cbfd09f..db41cb30cd816f8d5600c5499ffe6c77455ff290 100644 (file)
@@ -234,7 +234,9 @@ class LogRecord:
         # 'Value is %d' instead of 'Value is 0'.
         # For the use case of passing a dictionary, this should not be a
         # problem.
-        if args and (len(args) == 1) and args[0] and (type(args[0]) == types.DictType):
+        if args and len(args) == 1 and (
+                                        type(args[0]) == types.DictType
+                                       ) and args[0]:
             args = args[0]
         self.args = args
         self.levelname = getLevelName(level)