summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-30 12:03:11 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-30 12:03:11 +0000
commit7cc23ab6a66a7471fc44a09a47b6d143da4e3d00 (patch)
treea4ef0592e4972b9b20d6f91fae47337c228bfb2f /pykolab/imap
parente5575b6924a029d894ab6349783fbdb359fadf24 (diff)
downloadpykolab-7cc23ab6a66a7471fc44a09a47b6d143da4e3d00.tar.gz
Reconnect if setting quota fails
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index 68f0c78..67e04c4 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -598,7 +598,15 @@ class IMAP(object):
log.debug(_("Value for user is not a dictionary"), level=8)
def set_quota(self, folder, quota):
- self.imap._setquota(folder, quota)
+ i = 0
+ while i < 10:
+ try:
+ self.imap._setquota(folder, quota)
+ i = 10
+ except:
+ self.disconnect()
+ self.connect()
+ i += 1
def set_user_folder_quota(self, users=[], primary_domain=None, secondary_domain=[], folders=[]):
"""