Bugfix: use correct function and return value
This commit is contained in:
parent
88a58595fb
commit
fd8f5fc1d3
1 changed files with 3 additions and 2 deletions
|
@ -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
|
Loading…
Reference in a new issue