[Freeipa-devel] [PATCH] 0004 permission-add gives confusing error when adding ACI to generated tree
Martin Kosek
mkosek at redhat.com
Wed Oct 15 11:26:14 UTC 2014
On 10/15/2014 01:08 PM, thierry bordaz wrote:
> https://fedorahosted.org/freeipa/ticket/4523
I see 2 issues with the patch:
1) Patch description should not contain "
Reviewed by:", this gets added later by a script (or human)
2) The exception handling clause should be as focused as possible, i.e. not
including whole command, but rather just the failing call, i.e.:
def post_callback(self, ldap, dn, entry, *keys, **options):
try:
self.obj.add_aci(entry)
except Exception:
You can use
try:
...
except errors.NotFound:
self.obj.handle_not_found(*keys)
to raise the right error.
Martin
More information about the Freeipa-devel
mailing list