mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-26 13:42:49 +00:00
use f-strings in module utils (#10901)
* use f-strings in module utils * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * remove unused imports --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
74b6a0294a
commit
b85e263466
51 changed files with 270 additions and 382 deletions
|
|
@ -91,7 +91,7 @@ class LdapGeneric(object):
|
|||
if len(explode_dn) > 1:
|
||||
try:
|
||||
escaped_value = ldap.filter.escape_filter_chars(explode_dn[0])
|
||||
filterstr = "(%s)" % escaped_value
|
||||
filterstr = f"({escaped_value})"
|
||||
dns = self.connection.search_s(','.join(explode_dn[1:]),
|
||||
ldap.SCOPE_ONELEVEL, filterstr)
|
||||
if len(dns) == 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue