Changed lambda to str.strip in _strip_spaces in logging.config (#4332)

This commit is contained in:
sanjayp 2017-11-15 14:58:11 +05:30 committed by Vinay Sajip
parent 9165f77d5f
commit 2ae4ad7ca4
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ def _resolve(name):
return found return found
def _strip_spaces(alist): def _strip_spaces(alist):
return map(lambda x: x.strip(), alist) return map(str.strip, alist)
def _create_formatters(cp): def _create_formatters(cp):
"""Create and return formatters""" """Create and return formatters"""
@ -185,7 +185,7 @@ def _install_loggers(cp, handlers, disable_existing):
# configure the root first # configure the root first
llist = cp["loggers"]["keys"] llist = cp["loggers"]["keys"]
llist = llist.split(",") llist = llist.split(",")
llist = list(map(lambda x: x.strip(), llist)) llist = list(_strip_spaces(llist))
llist.remove("root") llist.remove("root")
section = cp["logger_root"] section = cp["logger_root"]
root = logging.root root = logging.root