diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-08-09 13:39:03 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-08-09 13:39:03 +0100 |
commit | 2e3f4492c4ee9197b8f4e62e07a57bb94501fc00 (patch) | |
tree | 56e867e4c2ee098919a4209fbb462836455d376d /pykolab/cli/cmd_list_quota.py | |
parent | b5746f0301982bd1b5efaf5027fae9c366765636 (diff) | |
download | pykolab-2e3f4492c4ee9197b8f4e62e07a57bb94501fc00.tar.gz |
Add --server=server to list-quota
Diffstat (limited to 'pykolab/cli/cmd_list_quota.py')
-rw-r--r-- | pykolab/cli/cmd_list_quota.py | 15 |
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 = [] |