mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
66ba9ffcb1
commit
c537881caa
|
@ -234,7 +234,9 @@ class LogRecord:
|
||||||
# 'Value is %d' instead of 'Value is 0'.
|
# 'Value is %d' instead of 'Value is 0'.
|
||||||
# For the use case of passing a dictionary, this should not be a
|
# For the use case of passing a dictionary, this should not be a
|
||||||
# problem.
|
# 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]
|
args = args[0]
|
||||||
self.args = args
|
self.args = args
|
||||||
self.levelname = getLevelName(level)
|
self.levelname = getLevelName(level)
|
||||||
|
|
Loading…
Reference in New Issue