personne => exit()

This commit is contained in:
Daniel STAN 2014-09-11 17:32:06 +02:00
parent 3a5e722133
commit 2cc487a48b

View file

@ -18,9 +18,10 @@ f = filter.human_to_ldap(sys.argv[1].decode('utf-8'))
res = ldap.search(f)
if len(res) > 1:
print("More than one result")
exit()
exit(1)
elif not res:
print("Nobody found")
exit(2)
else:
item = res[0]
item.display()