pykolab/auth
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Mon Apr 1 12:22:14 CEST 2013
pykolab/auth/ldap/__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 4f09459b00c84979c99eff5b94f7da91eba595d8
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Mon Apr 1 12:17:00 2013 +0200
Migration scenarios do not necessarily have a synchronisation cache entry (#1701)
Thanks to Sasha Wilde for discovering, reporting and providing a patch to fix the issue.
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index e0128cc..feaf894 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1475,12 +1475,17 @@ class LDAP(pykolab.base.Base):
Expects the new entry.
"""
+ # Initialize old_canon_attr (#1701)
+ old_canon_attr = None
+
result_attribute = conf.get('cyrus-sasl','result_attribute')
_entry = cache.get_entry(self.domain, entry, update=False)
- if _entry.__dict__.has_key('result_attribute') and not _entry.result_attribute == '':
- old_canon_attr = _entry.result_attribute
+ # We do not necessarily have a synchronisation cache entry (#1701)
+ if not _entry == None:
+ if _entry.__dict__.has_key('result_attribute') and not _entry.result_attribute == '':
+ old_canon_attr = _entry.result_attribute
entry_changes = self.recipient_policy(entry)
More information about the commits
mailing list