This commit is contained in:
PapaTutuWawa 2021-12-09 17:13:55 +01:00
parent 440927b2c1
commit 0b2cb22744

View File

@ -45,9 +45,9 @@ class LDAPConnection:
password = ldap_setting("BIND_PW", "")
if not password:
pwfile = ldap_setting("BIND_PW_FILE", "")
pw_file = ldap_setting("BIND_PW_FILE", "")
if pw_file:
with open(pwfile, "r") as f:
with open(pw_file, "r") as f:
password = f.read().replace("\n", "")
else:
logging.error("No bind password specified")