]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Substitute map() by a generator expression
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 1 Jun 2023 12:32:21 +0000 (14:32 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 1 Jun 2023 12:32:21 +0000 (14:32 +0200)
lib/pp_admintools/app/check_ldap_dn_attributes.py

index 06bed7a5ccd984fe9d0b7c2d11bedbf07d5ab33f..f84c52fe60b6479bfed650f0354a6544fa8ce56f 100644 (file)
@@ -27,7 +27,7 @@ from .. import pp
 from ..config.ldap import LdapConfiguration
 from ..xlate import XLATOR
 
-__version__ = '0.3.5'
+__version__ = '0.3.6'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -143,8 +143,7 @@ class CheckLdapDnAttributesApplication(BaseLdapApplication):
 
         The collected DNs are added to self.all_check_dns.
         """
-        ldap_filter = '(|' + ''.join(
-            map(lambda x: '({}=*)'.format(x), self.check_attributes)) + ')'
+        ldap_filter = '(|' + ''.join((('({}=*)'.format(x)) for x in self.check_attributes)) + ')'
 
         for dn in self.get_all_entry_dns(self.instance, ldap_filter=ldap_filter):
             self.all_check_dns.add(dn)