summaryrefslogtreecommitdiffstats
path: root/ipaserver/ipaldap.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-05-08 11:15:45 -0400
committerRob Crittenden <rcritten@redhat.com>2009-05-13 14:16:44 -0400
commit1c31b5bc08a2f4bc55678c69eb67508122480906 (patch)
tree0166354ab5bb1e8bb4b664efab23bb86e770556a /ipaserver/ipaldap.py
parentde88954b91f49387421f68a056a2e12cb6e94e7e (diff)
downloadfreeipa-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.py8
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