From 56eafffa6b07ff15ad65605f35c76f162d9be3fe Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 1 Jun 2023 14:32:21 +0200 Subject: [PATCH] Substitute map() by a generator expression --- lib/pp_admintools/app/check_ldap_dn_attributes.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) -- 2.39.5