personne => exit()
This commit is contained in:
parent
3a5e722133
commit
2cc487a48b
1 changed files with 2 additions and 1 deletions
|
@ -18,9 +18,10 @@ f = filter.human_to_ldap(sys.argv[1].decode('utf-8'))
|
||||||
res = ldap.search(f)
|
res = ldap.search(f)
|
||||||
if len(res) > 1:
|
if len(res) > 1:
|
||||||
print("More than one result")
|
print("More than one result")
|
||||||
exit()
|
exit(1)
|
||||||
elif not res:
|
elif not res:
|
||||||
print("Nobody found")
|
print("Nobody found")
|
||||||
|
exit(2)
|
||||||
else:
|
else:
|
||||||
item = res[0]
|
item = res[0]
|
||||||
item.display()
|
item.display()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue