Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug where ldap.NO_SUCH_OBJECT was used. #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fakeldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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, [])

Expand All @@ -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)]

Expand Down