From: Frank Brehm Date: Thu, 1 Jun 2023 12:32:21 +0000 (+0200) Subject: Substitute map() by a generator expression X-Git-Tag: 0.10.0^2~28 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=56eafffa6b07ff15ad65605f35c76f162d9be3fe;p=pixelpark%2Fpp-admin-tools.git Substitute map() by a generator expression --- diff --git a/lib/pp_admintools/app/check_ldap_dn_attributes.py b/lib/pp_admintools/app/check_ldap_dn_attributes.py index 06bed7a..f84c52f 100644 --- a/lib/pp_admintools/app/check_ldap_dn_attributes.py +++ b/lib/pp_admintools/app/check_ldap_dn_attributes.py @@ -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)