summaryrefslogtreecommitdiffstats
path: root/bin/kolab_smtp_access_policy.py
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:36:07 +0100
commited7851eaa5925073b4bdcc4b1d5df30c7eafff28 (patch)
treed1a912d7a1fef06ff243b4681b579a49c29c8f73 /bin/kolab_smtp_access_policy.py
parent23f28a7a1ce96532dc22b434d5b092e27e65d175 (diff)
downloadpykolab-ed7851eaa5925073b4bdcc4b1d5df30c7eafff28.tar.gz
Ensure unique recipients in list
Diffstat (limited to 'bin/kolab_smtp_access_policy.py')
-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 49319c1..e19d156 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):
"""