diff --git a/fakeldap.py b/fakeldap.py index a0cd5f6..a65e030 100644 --- a/fakeldap.py +++ b/fakeldap.py @@ -302,7 +302,7 @@ def _modify_s(self, dn, mod_attrs): try: entry = self.directory[dn] except KeyError: - raise ldap.NO_SUCH_OBJECT + raise self.NO_SUCH_OBJECT for item in mod_attrs: op, key, value = item @@ -349,7 +349,7 @@ def _delete_s(self, dn): try: del self.directory[dn] except KeyError: - raise ldap.NO_SUCH_OBJECT + raise self.NO_SUCH_OBJECT return (107, []) @@ -370,7 +370,7 @@ def _search_s(self, base, scope, filterstr, attrlist, attrsonly): attrs = self.directory.get(base) print attrs if attrs is None: - raise ldap.NO_SUCH_OBJECT + raise self.NO_SUCH_OBJECT return [(base, attrs)]