summaryrefslogtreecommitdiffstats
path: root/pykolab/cli
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-01-27 13:29:57 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-01-27 13:29:57 +0100
commiteef4fcb4a64c29a9c1c5fb670f8a5a6a813591b3 (patch)
treea37253ce5a46a4aa5220d61d896086b160ea77fb /pykolab/cli
parent647634e70b04f7c624bd0cfdea755b294d029f8c (diff)
downloadpykolab-eef4fcb4a64c29a9c1c5fb670f8a5a6a813591b3.tar.gz
Add an option to specify the partition on which a mailbox is to be created
Diffstat (limited to 'pykolab/cli')
-rw-r--r--pykolab/cli/cmd_create_mailbox.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pykolab/cli/cmd_create_mailbox.py b/pykolab/cli/cmd_create_mailbox.py
index 63ae0ad..6192b91 100644
--- a/pykolab/cli/cmd_create_mailbox.py
+++ b/pykolab/cli/cmd_create_mailbox.py
@@ -42,6 +42,14 @@ def cli_options():
help = _("Set metadata for folder to ANNOTATION=VALUE")
)
+ my_option_group.add_option(
+ '--partition',
+ dest = "partition",
+ action = "store",
+ default = None,
+ help = _("Create folder on PARTITION.")
+ )
+
def description():
return """Create a mailbox or sub-folder of an existing mailbox."""
@@ -63,7 +71,7 @@ def execute(*args, **kw):
imap = IMAP()
imap.connect()
- imap.create_folder(mailbox)
+ imap.create_folder(mailbox, partition=conf.partition)
if not conf.metadata == None:
imap.set_metadata(mailbox, conf.metadata.split('=')[0], conf.metadata.split('=')[1])