Skip to content

Commit 2ae4ad7

Browse files
snjyplvsajip
authored andcommitted
Changed lambda to str.strip in _strip_spaces in logging.config (#4332)
1 parent 9165f77 commit 2ae4ad7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/logging/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _resolve(name):
9797
return found
9898

9999
def _strip_spaces(alist):
100-
return map(lambda x: x.strip(), alist)
100+
return map(str.strip, alist)
101101

102102
def _create_formatters(cp):
103103
"""Create and return formatters"""
@@ -185,7 +185,7 @@ def _install_loggers(cp, handlers, disable_existing):
185185
# configure the root first
186186
llist = cp["loggers"]["keys"]
187187
llist = llist.split(",")
188-
llist = list(map(lambda x: x.strip(), llist))
188+
llist = list(_strip_spaces(llist))
189189
llist.remove("root")
190190
section = cp["logger_root"]
191191
root = logging.root

0 commit comments

Comments
 (0)