Bugfix: use correct function and return value

This commit is contained in:
PCoder 2019-02-03 13:34:29 +01:00
parent 88a58595fb
commit fd8f5fc1d3

View file

@ -15,7 +15,7 @@ def create_user(user, password, firstname, lastname, email):
raise Exception('Could not connect to LDAP Server') raise Exception('Could not connect to LDAP Server')
obj_new_user = ObjectDef(['inetOrgPerson', 'posixAccount'], conn) obj_new_user = ObjectDef(['inetOrgPerson', 'posixAccount'], conn)
uidNumber = settings.get_max_uid() + 1 uidNumber = get_max_uid() + 1
logger.debug("uidNumber={uidNumber}".format(uidNumber=uidNumber)) logger.debug("uidNumber={uidNumber}".format(uidNumber=uidNumber))
results = True results = True
while results: while results:
@ -80,4 +80,5 @@ def get_max_uid():
except FileNotFoundError as fnfe: except FileNotFoundError as fnfe:
logger.error("File not found : " + str(fnfe)) logger.error("File not found : " + str(fnfe))
ret = settings.LDAP_DEFAULT_START_UID ret = settings.LDAP_DEFAULT_START_UID
logger.error("So, returing UID={}".format(ret)) logger.error("So, returing UID={}".format(ret))
return ret