summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2020-02-23 10:45:55 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2020-02-23 11:03:35 +0100
commit176b23c2b5ef24e368c384c4e30e6534e37fe7f6 (patch)
treeee4c15083dce8e126ccf64cf0f2ddf41c7c55781
parent49629e963e2f34ee0d414983768a51063206b6e0 (diff)
downloadpykolab-176b23c2b5ef24e368c384c4e30e6534e37fe7f6.tar.gz
Fix lint issues
-rw-r--r--pykolab/cli/cmd_list_mailboxes.py35
1 files changed, 22 insertions, 13 deletions
diff --git a/pykolab/cli/cmd_list_mailboxes.py b/pykolab/cli/cmd_list_mailboxes.py
index 61dfb08..3b3bbd8 100644
--- a/pykolab/cli/cmd_list_mailboxes.py
+++ b/pykolab/cli/cmd_list_mailboxes.py
@@ -28,28 +28,37 @@ from pykolab.translate import _
log = pykolab.getLogger('pykolab.cli')
conf = pykolab.getConf()
+
def __init__():
commands.register('list_mailboxes', execute, description=description(), aliases='lm')
+
def description():
return "List mailboxes.\n" + \
"%-28s" % ('') + \
"Use wildcards '*' and '%' for more control.\n"
+
def cli_options():
my_option_group = conf.add_cli_parser_option_group(_("CLI Options"))
- my_option_group.add_option( '--raw',
- dest = "raw",
- action = "store_true",
- default = False,
- help = _("Display raw IMAP UTF-7 folder names"))
-
- my_option_group.add_option( '--server',
- dest = "connect_server",
- action = "store",
- default = None,
- metavar = "SERVER",
- help = _("List mailboxes on server SERVER only."))
+
+ my_option_group.add_option(
+ '--raw',
+ dest="raw",
+ action="store_true",
+ default=False,
+ help=_("Display raw IMAP UTF-7 folder names")
+ )
+
+ my_option_group.add_option(
+ '--server',
+ dest="connect_server",
+ action="store",
+ default=None,
+ metavar="SERVER",
+ help=_("List mailboxes on server SERVER only.")
+ )
+
def execute(*args, **kw):
"""
@@ -72,7 +81,7 @@ def execute(*args, **kw):
searches.append(arg)
if len(searches) == 0:
- searches = [ '' ]
+ searches = ['']
imap = IMAP()