Fix error message for nonexistent members and add tests.

https://fedorahosted.org/freeipa/ticket/4643

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
David Kupka
2014-10-21 18:12:23 -04:00
committed by Tomas Babej
parent b42b1755dc
commit 56ca47d535
2 changed files with 39 additions and 1 deletions

View File

@@ -735,7 +735,10 @@ class automember_rebuild(Command):
names = options.get(opt_name)
if names:
for name in names:
obj.get_dn_if_exists(name)
try:
obj.get_dn_if_exists(name)
except errors.NotFound:
obj.handle_not_found(name)
search_filter = ldap.make_filter_from_attr(
obj.primary_key.name,
names,