summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-10 01:57:01 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-23 17:04:56 +0000
commit9163470b761af3c3f046176226b9400dcb42d00e (patch)
tree333982c9486c85928d7dca337fcddc6bcbe43d78
parent63196ecfd572970595e8d7853388a59de60267ad (diff)
downloadpykolab-9163470b761af3c3f046176226b9400dcb42d00e.tar.gz
Make sure the result_attribute dict key exists
-rw-r--r--pykolab/auth/ldap/cache.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/cache.py b/pykolab/auth/ldap/cache.py
index 8bdeebe..503c3c5 100644
--- a/pykolab/auth/ldap/cache.py
+++ b/pykolab/auth/ldap/cache.py
@@ -107,6 +107,10 @@ def get_entry(domain, entry):
if _entry == None:
log.debug(_("Inserting cache entry %r") % (entry['id']), level=8)
+
+ if not entry.has_key(result_attribute):
+ entry[result_attribute] = ''
+
db.add(
Entry(
entry['id'],