From a9a6b62cf2abb833d54c60aa1363e5acfc3cdfd5 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 9 Jun 2008 15:26:56 +0000 Subject: Check properly whether a certain dn exists in storage, must have at least one attribute --- Pivot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Pivot.py') 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): -- cgit v1.2.3