summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-13 16:28:26 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-13 16:28:26 +0200
commiteeb52be1e300509cb1129e6951e7451cd441957c (patch)
tree6213546f9836799327182add1b8691d007dc0628 /pykolab/imap
parent3bf16dfc05fcad3cb01bf0a3b21611db4839e8ce (diff)
downloadpykolab-eeb52be1e300509cb1129e6951e7451cd441957c.tar.gz
Do not fail as miserably if setting an ACL fails
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index f52dc9f..b3af455 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -364,7 +364,16 @@ class IMAP(object):
_acl = [x for x in _acl.split() if x not in acl_map['subtract'].split()]
acl = ''.join(list(set(_acl)))
- self.imap.sam(self.folder_utf7(folder), identifier, acl)
+ try:
+ self.imap.sam(self.folder_utf7(folder), identifier, acl)
+ except Exception, errmsg:
+ log.error(
+ _("Could not set ACL for %s on folder %s: %r") % (
+ identifier,
+ folder,
+ errmsg
+ )
+ )
def set_metadata(self, folder, metadata_path, metadata_value, shared=True):
"""