summaryrefslogtreecommitdiffstats
path: root/ipaserver/ipaldap.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2009-04-23 14:51:59 +0200
committerRob Crittenden <rcritten@redhat.com>2009-04-23 10:29:14 -0400
commit7d0bd4b8951ef7894668ad3c63607769e208c9d0 (patch)
tree25cfb046e3f16814d66465c72ce5a0cbe00a00fd /ipaserver/ipaldap.py
parent596d410471672eac0e429c53d2f28ff6ea43d867 (diff)
downloadfreeipa-7d0bd4b8951ef7894668ad3c63607769e208c9d0.tar.gz
freeipa-7d0bd4b8951ef7894668ad3c63607769e208c9d0.tar.xz
freeipa-7d0bd4b8951ef7894668ad3c63607769e208c9d0.zip
Rename errors2.py to errors.py. Modify all affected files.
Diffstat (limited to 'ipaserver/ipaldap.py')
-rw-r--r--ipaserver/ipaldap.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py
index e63fe55b9..7d194aa95 100644
--- a/ipaserver/ipaldap.py
+++ b/ipaserver/ipaldap.py
@@ -32,7 +32,7 @@ import ldap.sasl
from ldap.controls import LDAPControl,DecodeControlTuples,EncodeControlTuples
from ldap.ldapobject import SimpleLDAPObject
from ipaserver import ipautil
-from ipalib import errors2
+from ipalib import errors
# Global variable to define SASL auth
sasl_auth = ldap.sasl.sasl({},'GSSAPI')
@@ -283,30 +283,30 @@ class IPAdmin(SimpleLDAPObject):
raise e
except ldap.NO_SUCH_OBJECT, e:
args = kw.get('args', '')
- raise errors2.NotFound(msg=notfound(args))
+ raise errors.NotFound(msg=notfound(args))
except ldap.ALREADY_EXISTS, e:
- raise errors2.DuplicateEntry()
+ raise errors.DuplicateEntry()
except ldap.CONSTRAINT_VIOLATION, e:
# This error gets thrown by the uniqueness plugin
if info == 'Another entry with the same attribute value already exists':
- raise errors2.DuplicateEntry()
+ raise errors.DuplicateEntry()
else:
- raise errors2.DatabaseError(desc=desc,info=info)
+ raise errors.DatabaseError(desc=desc,info=info)
except ldap.INSUFFICIENT_ACCESS, e:
- raise errors2.ACIError(info=info)
+ raise errors.ACIError(info=info)
except ldap.NO_SUCH_ATTRIBUTE:
# this is raised when a 'delete' attribute isn't found.
# it indicates the previous attribute was removed by another
# update, making the oldentry stale.
- raise errors2.MidairCollision()
+ raise errors.MidairCollision()
except ldap.ADMINLIMIT_EXCEEDED, e:
- raise errors2.LimitsExceeded()
+ raise errors.LimitsExceeded()
except ldap.SIZELIMIT_EXCEEDED, e:
- raise errors2.LimitsExceeded()
+ raise errors.LimitsExceeded()
except ldap.TIMELIMIT_EXCEEDED, e:
- raise errors2.LimitsExceeded()
+ raise errors.LimitsExceeded()
except ldap.LDAPError, e:
- raise errors2.DatabaseError(desc=desc,info=info)
+ raise errors.DatabaseError(desc=desc,info=info)
def toLDAPURL(self):
return "ldap://%s:%d/" % (self.host,self.port)
@@ -345,7 +345,7 @@ class IPAdmin(SimpleLDAPObject):
self.__handle_errors(e, **kw)
if not obj:
- raise errors2.NotFound(msg=notfound(args))
+ raise errors.NotFound(msg=notfound(args))
elif isinstance(obj,Entry):
return obj
@@ -367,7 +367,7 @@ class IPAdmin(SimpleLDAPObject):
self.__handle_errors(e, **kw)
if not obj:
- raise errors2.NotFound(msg=notfound(args))
+ raise errors.NotFound(msg=notfound(args))
entries = []
for s in obj:
@@ -405,7 +405,7 @@ class IPAdmin(SimpleLDAPObject):
self.__handle_errors(e, **kw)
if not entries:
- raise errors2.NotFound(msg=notfound(args))
+ raise errors.NotFound(msg=notfound(args))
if partial == 1:
counter = -1