summaryrefslogtreecommitdiffstats
path: root/pykolab/cli
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-10-11 14:59:11 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-10-11 21:30:55 +0200
commit75f998a71169fb0cf8e95633614316c8a455fe32 (patch)
tree796a1b8b311f6fd4784a2d5a2279fe6f9ebf8d8f /pykolab/cli
parent889ecead89b87a2ff43491e3c9a7cfc6b0a0c41a (diff)
downloadpykolab-75f998a71169fb0cf8e95633614316c8a455fe32.tar.gz
Add a command-line option --resync to the sync command, to ignore the latest timestamp
Diffstat (limited to 'pykolab/cli')
-rw-r--r--pykolab/cli/cmd_sync.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pykolab/cli/cmd_sync.py b/pykolab/cli/cmd_sync.py
index d60fd31..e4f4bdf 100644
--- a/pykolab/cli/cmd_sync.py
+++ b/pykolab/cli/cmd_sync.py
@@ -31,6 +31,14 @@ conf = pykolab.getConf()
def __init__():
commands.register('sync', execute, description="Synchronize Kolab Users with IMAP.")
+def cli_options():
+ my_option_group = conf.add_cli_parser_option_group(_("CLI Options"))
+ my_option_group.add_option( '--resync',
+ dest = "resync",
+ action = "store_true",
+ default = False,
+ help = _("Resync from the beginning"))
+
def execute(*args, **kw):
auth = Auth()
log.debug(_("Listing domains..."), level=5)