summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-16 19:35:41 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-16 19:35:41 +0100
commita1a1cba81a1ac4e29f37090c599177f5f5a19d41 (patch)
tree5a4993db8ca31ccdcbcb763cb91880c2384dc98d
parent5f9f8c0e529bceee589277c5475508e91f146b64 (diff)
downloadpykolab-a1a1cba81a1ac4e29f37090c599177f5f5a19d41.tar.gz
Ensure unique recipients in list
-rwxr-xr-xbin/kolab_smtp_access_policy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index bce2614..09420e8 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -183,7 +183,7 @@ class PolicyRequest(object):
else:
if not policy_request['recipient'].strip() == '':
- self.recipients.append(policy_request['recipient'])
+ self.recipients = list(set(self.recipients + [policy_request['recipient']]))
def add_request(self, policy_request={}):
"""
@@ -214,7 +214,7 @@ class PolicyRequest(object):
)
if not policy_request['recipient'].strip() == '':
- self.recipients.append(policy_request['recipient'])
+ self.recipients = list(set(self.recipients + [policy_request['recipient']]))
def parse_ldap_dn(self, dn):
"""