From d0a5f16799c9ad2de4ad578b4d329faa2f7723ef Mon Sep 17 00:00:00 2001 From: "vinay.sajip" Date: Thu, 27 Sep 2007 07:35:10 +0000 Subject: [PATCH] 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. git-svn-id: http://svn.python.org/projects/python/trunk@58272 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Lib/logging/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 9299b8f52e..db41cb30cd 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) -- 2.11.4.GIT