summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/automember.py
diff options
context:
space:
mode:
authorDavid Kupka <dkupka@redhat.com>2014-10-21 18:12:23 -0400
committerTomas Babej <tbabej@redhat.com>2014-11-24 16:04:57 +0100
commit56ca47d535156122b2578ff19bc0b1a7642af40c (patch)
treef9d8b57fcf62f02f7fe439bdc25db04f53bf6c5b /ipalib/plugins/automember.py
parentb42b1755dcd0a681709525b4d574e12b77bbce13 (diff)
downloadfreeipa-56ca47d535156122b2578ff19bc0b1a7642af40c.tar.gz
freeipa-56ca47d535156122b2578ff19bc0b1a7642af40c.tar.xz
freeipa-56ca47d535156122b2578ff19bc0b1a7642af40c.zip
Fix error message for nonexistent members and add tests.
https://fedorahosted.org/freeipa/ticket/4643 Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipalib/plugins/automember.py')
-rw-r--r--ipalib/plugins/automember.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py
index 0f4739316..0c2a246e1 100644
--- a/ipalib/plugins/automember.py
+++ b/ipalib/plugins/automember.py
@@ -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,