From d31d1a78d0b8d1227fa5e041f03d8a0275059e81 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Wed, 4 Nov 2020 04:03:55 +0000 Subject: [PATCH] Fix logging bug --- ldapserver/ldap_functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldapserver/ldap_functions.py b/ldapserver/ldap_functions.py index 93982d3..192a087 100644 --- a/ldapserver/ldap_functions.py +++ b/ldapserver/ldap_functions.py @@ -102,7 +102,7 @@ def create_user(first, last, username, email, password): result = ldap_conn.add_s(dn, ldif) - logger.info(' Result: ' + result) + logger.info(' Result: ' + str(result)) # set password pass_quotes = '"{}"'.format(password) @@ -110,13 +110,13 @@ def create_user(first, last, username, email, password): change_des = [(ldap.MOD_REPLACE, 'unicodePwd', [pass_uni])] result = ldap_conn.modify_s(dn, change_des) - logger.info(' Result: ' + result) + logger.info(' Result: ' + str(result)) # 512 will set user account to enabled mod_acct = [(ldap.MOD_REPLACE, 'userAccountControl', b'512')] result = ldap_conn.modify_s(dn, mod_acct) - logger.info(' Result: ' + result) + logger.info(' Result: ' + str(result)) finally: ldap_conn.unbind()