mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Remove dict.has_key() and apply() usage from the logging package to silence
warnings when run under -3.
This commit is contained in:
parent
36bed8a25f
commit
e6bfe80b67
2 changed files with 17 additions and 17 deletions
|
@ -152,7 +152,7 @@ def _install_handlers(cp, formatters):
|
|||
klass = _resolve(klass)
|
||||
args = cp.get(sectname, "args")
|
||||
args = eval(args, vars(logging))
|
||||
h = apply(klass, args)
|
||||
h = klass(*args)
|
||||
if "level" in opts:
|
||||
level = cp.get(sectname, "level")
|
||||
h.setLevel(logging._levelNames[level])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue