diff --git a/myauth/ldap.py b/myauth/ldap.py index 0075fab..91c0ada 100644 --- a/myauth/ldap.py +++ b/myauth/ldap.py @@ -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")