From 56ca47d535156122b2578ff19bc0b1a7642af40c Mon Sep 17 00:00:00 2001 From: David Kupka Date: Tue, 21 Oct 2014 18:12:23 -0400 Subject: Fix error message for nonexistent members and add tests. https://fedorahosted.org/freeipa/ticket/4643 Reviewed-By: Tomas Babej --- ipalib/plugins/automember.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ipalib/plugins/automember.py') 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, -- cgit