Fixed bug in handling of args in LogRecord.__init__.

This commit is contained in:
Vinay Sajip 2004-10-21 21:24:27 +00:00
parent c19ccc9f11
commit dccd4321a7
1 changed files with 1 additions and 1 deletions

View 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)