diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-05-08 11:15:45 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-05-13 14:16:44 -0400 |
commit | 1c31b5bc08a2f4bc55678c69eb67508122480906 (patch) | |
tree | 0166354ab5bb1e8bb4b664efab23bb86e770556a /ipaserver/ipaldap.py | |
parent | de88954b91f49387421f68a056a2e12cb6e94e7e (diff) | |
download | freeipa-1c31b5bc08a2f4bc55678c69eb67508122480906.tar.gz freeipa-1c31b5bc08a2f4bc55678c69eb67508122480906.tar.xz freeipa-1c31b5bc08a2f4bc55678c69eb67508122480906.zip |
Add a reason to the NotFound exception so we can provide more robust errors
Diffstat (limited to 'ipaserver/ipaldap.py')
-rw-r--r-- | ipaserver/ipaldap.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py index c80cda428..d60e23fd6 100644 --- a/ipaserver/ipaldap.py +++ b/ipaserver/ipaldap.py @@ -298,7 +298,7 @@ class IPAdmin(SimpleLDAPObject): raise e except ldap.NO_SUCH_OBJECT, e: args = kw.get('args', '') - raise errors.NotFound(msg=notfound(args)) + raise errors.NotFound(reason=notfound(args)) except ldap.ALREADY_EXISTS, e: raise errors.DuplicateEntry() except ldap.CONSTRAINT_VIOLATION, e: @@ -361,7 +361,7 @@ class IPAdmin(SimpleLDAPObject): self.__handle_errors(e, **kw) if not obj: - raise errors.NotFound(msg=notfound(args)) + raise errors.NotFound(reason=notfound(args)) elif isinstance(obj,Entry): return obj @@ -383,7 +383,7 @@ class IPAdmin(SimpleLDAPObject): self.__handle_errors(e, **kw) if not obj: - raise errors.NotFound(msg=notfound(args)) + raise errors.NotFound(reason=notfound(args)) entries = [] for s in obj: @@ -421,7 +421,7 @@ class IPAdmin(SimpleLDAPObject): self.__handle_errors(e, **kw) if not entries: - raise errors.NotFound(msg=notfound(args)) + raise errors.NotFound(reason=notfound(args)) if partial == 1: counter = -1 |