mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
idviews: Do not abort the find & show commands on conversion errors
https://fedorahosted.org/freeipa/ticket/4524 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
0e11a87090
commit
bff7a748d6
@ -686,7 +686,12 @@ class baseidoverride_find(LDAPSearch):
|
||||
|
||||
def post_callback(self, ldap, entries, truncated, *args, **options):
|
||||
for entry in entries:
|
||||
self.obj.convert_anchor_to_human_readable_form(entry, **options)
|
||||
try:
|
||||
self.obj.convert_anchor_to_human_readable_form(entry, **options)
|
||||
except errors.NotFound:
|
||||
# If the conversion to readle form went wrong, do not
|
||||
# abort the whole find command. Use non-converted entry.
|
||||
pass
|
||||
return truncated
|
||||
|
||||
|
||||
@ -694,7 +699,12 @@ class baseidoverride_show(LDAPRetrieve):
|
||||
__doc__ = _('Display information about an ID override.')
|
||||
|
||||
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
|
||||
self.obj.convert_anchor_to_human_readable_form(entry_attrs, **options)
|
||||
try:
|
||||
self.obj.convert_anchor_to_human_readable_form(entry_attrs, **options)
|
||||
except errors.NotFound:
|
||||
# If the conversion to readle form went wrong, do not
|
||||
# abort the whole show command. Use non-converted entry.
|
||||
pass
|
||||
return dn
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user