diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2007-09-27 07:35:10 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2007-09-27 07:35:10 (GMT) |
commit | c537881caab4d63e34b7424459c3822292ad2375 (patch) | |
tree | 975599fcddb7135d4dcb7a18f03532850c4ff4e2 /Lib/logging | |
parent | 66ba9ffcb15d4f952b3907e375e1f290765ae79f (diff) | |
download | cpython-c537881caab4d63e34b7424459c3822292ad2375.zip cpython-c537881caab4d63e34b7424459c3822292ad2375.tar.gz cpython-c537881caab4d63e34b7424459c3822292ad2375.tar.bz2 |
Change to LogRecord.__init__() to fix #1206. Note that archaic use of type(x) == types.DictType is because of keeping 1.5.2 compatibility. While this is much less relevant these days, there probably needs to be a separate commit for removing all archaic constructs at the same time.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 9299b8f..db41cb3 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -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) |