summaryrefslogtreecommitdiffstats
path: root/pykolab/cli/cmd_sync.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-13 11:39:54 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-13 11:39:54 +0100
commit9d544f1ed4f7181d11916d3cf19a00e08acfe1a3 (patch)
tree279860fef3338de56dcb5fc257351737049a6deb /pykolab/cli/cmd_sync.py
parentf2247ae5bc393e813e3775c82e1c051dbbcabd78 (diff)
downloadpykolab-9d544f1ed4f7181d11916d3cf19a00e08acfe1a3.tar.gz
Fix command-line sync
Diffstat (limited to 'pykolab/cli/cmd_sync.py')
-rw-r--r--pykolab/cli/cmd_sync.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pykolab/cli/cmd_sync.py b/pykolab/cli/cmd_sync.py
index 2cbb05f..4ac675a 100644
--- a/pykolab/cli/cmd_sync.py
+++ b/pykolab/cli/cmd_sync.py
@@ -19,8 +19,10 @@
import commands
+import time
import pykolab
+from pykolab.auth import Auth
from pykolab.translate import _
log = pykolab.getLogger('pykolab.cli')
@@ -30,6 +32,7 @@ def __init__():
commands.register('sync', execute, description="Synchronize Kolab Users with IMAP.")
def execute(*args, **kw):
+ auth = Auth()
log.debug(_("Listing domains..."), level=5)
start_time = time.time()
domains = auth.list_domains()
@@ -48,7 +51,7 @@ def execute(*args, **kw):
log.debug(_("Running for domain %s") % (primary_domain), level=8)
auth.connect(primary_domain)
start_time = time.time()
- auth.synchronize(primary_domain, secondary_domains)
+ auth.synchronize()
end_time = time.time()
log.info(_("Synchronizing users for %s took %d seconds")