summaryrefslogtreecommitdiff
path: root/Pivot.py
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2008-06-09 15:26:56 +0000
committerStef Walter <stef@thewalter.net>2008-06-09 15:26:56 +0000
commita9a6b62cf2abb833d54c60aa1363e5acfc3cdfd5 (patch)
tree20082b3cf57a1f0fbf797edadf54835cb0e66919 /Pivot.py
parent70885122408498e4a11961026b9abd82b88f0bdc (diff)
Check properly whether a certain dn exists in storage, must have at
least one attribute
Diffstat (limited to 'Pivot.py')
-rw-r--r--Pivot.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Pivot.py b/Pivot.py
index 5f02d92..1a27826 100644
--- a/Pivot.py
+++ b/Pivot.py
@@ -142,7 +142,9 @@ class Storage:
return self.entries.keys()[:] # copy
def exists(self, dn):
- return dn in self.entries.keys()
+ if not self.entries.has_key("dn"):
+ return False
+ return len(self.entries["dn"]) > 0
def delete(self, dn):
if self.entries.has_key(dn):