]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Changed lambda to str.strip in _strip_spaces in logging.config (#4332)
authorsanjayp <sanjaypillai11@gmail.com>
Wed, 15 Nov 2017 09:28:11 +0000 (14:58 +0530)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 15 Nov 2017 09:28:11 +0000 (09:28 +0000)
Lib/logging/config.py

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