summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-08-09 12:39:03 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-08-09 12:39:03 (GMT)
commit2e3f4492c4ee9197b8f4e62e07a57bb94501fc00 (patch)
tree56e867e4c2ee098919a4209fbb462836455d376d
parentb5746f0301982bd1b5efaf5027fae9c366765636 (diff)
downloadpykolab-2e3f4492c4ee9197b8f4e62e07a57bb94501fc00.tar.gz
Add --server=server to list-quota
-rw-r--r--pykolab/cli/cmd_list_quota.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/pykolab/cli/cmd_list_quota.py b/pykolab/cli/cmd_list_quota.py
index 4d3221f..9980ea3 100644
--- a/pykolab/cli/cmd_list_quota.py
+++ b/pykolab/cli/cmd_list_quota.py
@@ -32,6 +32,15 @@ conf = pykolab.getConf()
def __init__():
commands.register('list_quota', execute, description=description(), aliases=['lq'])
+def cli_options():
+ my_option_group = conf.add_cli_parser_option_group(_("CLI Options"))
+ my_option_group.add_option( '--server',
+ dest = "connect_server",
+ action = "store",
+ default = None,
+ metavar = "SERVER",
+ help = _("List mailboxes on server SERVER only."))
+
def description():
return """List quota for a folder."""
@@ -46,7 +55,11 @@ def execute(*args, **kw):
quota_folder = '*'
imap = IMAP()
- imap.connect()
+
+ if not conf.connect_server == None:
+ imap.connect(server=conf.connect_server)
+ else:
+ imap.connect()
folders = []