summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-05-16 19:41:29 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-05-16 19:41:29 +0200
commitf1351a4c2485a9be8f0a524e63652addcb385a5d (patch)
treed4bdf233b9a4212bed9562e32309ef127f984ffe /pykolab/plugins
parentfeaaf5b27be3493f90ba3d9627f7b63c79f87bc9 (diff)
downloadpykolab-f1351a4c2485a9be8f0a524e63652addcb385a5d.tar.gz
Make sure a failing recipient policy does not result in a blocked process (#1878)
Diffstat (limited to 'pykolab/plugins')
-rw-r--r--pykolab/plugins/recipientpolicy/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pykolab/plugins/recipientpolicy/__init__.py b/pykolab/plugins/recipientpolicy/__init__.py
index 8dff05e..8ea2c89 100644
--- a/pykolab/plugins/recipientpolicy/__init__.py
+++ b/pykolab/plugins/recipientpolicy/__init__.py
@@ -77,9 +77,10 @@ class KolabRecipientpolicy(object):
return mail
except KeyError, e:
log.warning(_("Attribute substitution for 'mail' failed in Recipient Policy"))
- mail = utils.translate(user_attrs['mail'], user_attrs['preferredlanguage'])
- mail = mail.lower()
- return mail
+ if user_attrs.has_key('mail'):
+ return mail
+ else:
+ return None
def set_secondary_mail(self, *args, **kw):
"""