summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-01-15 15:40:45 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-01-15 15:41:18 +0100
commit4829b270a75abd929a8897559bcb1610e847417e (patch)
treeb610fa4abe7790c05a980b95945cb13900fdb27f /pykolab/imap
parent3a69f985de5401a1493a65bde27b0cbb5a7abf31 (diff)
downloadpykolab-4829b270a75abd929a8897559bcb1610e847417e.tar.gz
Add the option for partition to rename-mailbox
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index fbaaf28..f9c95f1 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -628,17 +628,17 @@ class IMAP(object):
def user_mailbox_quota(self, mailbox_quota):
pass
- def user_mailbox_rename(self, old_name, new_name):
+ def user_mailbox_rename(self, old_name, new_name, partition=None):
old_name = "user%s%s" % (self.get_separator(),old_name)
new_name = "user%s%s" % (self.get_separator(),new_name)
- if old_name == new_name:
+ if old_name == new_name and partition == None:
return
- if not self.has_folder(new_name):
+ if not self.has_folder(new_name) or not partition == None:
log.info(_("Renaming INBOX from %s to %s") % (old_name,new_name))
try:
- self.imap.rename(old_name,new_name)
+ self.imap.rename(old_name,new_name,partition)
except:
log.error(_("Could not rename INBOX folder %s to %s") % (old_name,new_name))
else: