]> granicus.if.org Git - python/commitdiff
Fixed bug in handling of args in LogRecord.__init__.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 21 Oct 2004 21:24:27 +0000 (21:24 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 21 Oct 2004 21:24:27 +0000 (21:24 +0000)
Lib/logging/__init__.py

index 579c2c449e2d50a9b3a64fd0347677ccbff6a659..f0dec045d0261e6a33c3f9c1e90f4ded863c4f5d 100644 (file)
@@ -204,7 +204,7 @@ 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]:
+        if args and (len(args) == 1) and args[0] and (type(args[0]) == types.DictType):
             args = args[0]
         self.args = args
         self.levelname = getLevelName(level)