summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-04-01 12:17:00 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-04-01 12:18:51 +0200
commit4f09459b00c84979c99eff5b94f7da91eba595d8 (patch)
treefaaa007be370c975dc0cf84e385f37416eef5d2a /pykolab
parent078ee0d4febddea0c7e01eb2be97d964aae0563e (diff)
downloadpykolab-4f09459b00c84979c99eff5b94f7da91eba595d8.tar.gz
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.
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py9
1 files changed, 7 insertions, 2 deletions
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)