mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
batch 1 - update Python idiom to 3.7 using pyupgrade (#11341)
* batch 1 - update Python idiom to 3.7 using pyupgrade * add changelog frag * add changelog frag
This commit is contained in:
@@ -88,10 +88,10 @@ def uldap():
|
||||
|
||||
def construct():
|
||||
try:
|
||||
secret_file = open("/etc/ldap.secret", "r")
|
||||
secret_file = open("/etc/ldap.secret")
|
||||
bind_dn = f"cn=admin,{base_dn()}"
|
||||
except IOError: # pragma: no cover
|
||||
secret_file = open("/etc/machine.secret", "r")
|
||||
except OSError: # pragma: no cover
|
||||
secret_file = open("/etc/machine.secret")
|
||||
bind_dn = config_registry()["ldap/hostdn"]
|
||||
pwd_line = secret_file.readline()
|
||||
pwd = re.sub("\n", "", pwd_line)
|
||||
|
||||
Reference in New Issue
Block a user