Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_sync.py
Context not available. | |||||
auth = Auth() | auth = Auth() | ||||
if conf.domain == "all": | if conf.domain == "all": | ||||
log.debug(_("Listing domains..."), level=5) | log.debug(_("Listing domains..."), level=5) | ||||
start_time = time.time() | start_time = time.time() | ||||
domains = auth.list_domains() | domains = auth.list_domains() | ||||
end_time = time.time() | end_time = time.time() | ||||
log.debug( | log.debug( | ||||
_("Found %d domains in %d seconds") % ( | _("Found %d domains in %d seconds") % ( | ||||
len(domains), | len(domains), | ||||
(end_time-start_time) | (end_time-start_time) | ||||
), | ), | ||||
level=8 | level=8 | ||||
) | ) | ||||
else: | else: | ||||
domains = {} | domains = {} | ||||
domains[conf.domain] = conf.domain | domains[conf.domain] = conf.domain | ||||
if version.StrictVersion(sys.version[:3]) >= version.StrictVersion("2.7"): | if version.StrictVersion(sys.version[:3]) >= version.StrictVersion("2.7"): | ||||
pool = multiprocessing.Pool(conf.threads, worker_process, (), 1) | pool = multiprocessing.Pool(conf.threads, worker_process, (), 1) | ||||
Context not available. | |||||
entry = utils.normalize(kw) | entry = utils.normalize(kw) | ||||
mailbox_attribute = conf.get('cyrus-sasl', 'result_attribute') | mailbox_attribute = conf.get('cyrus-sasl', 'result_attribute') | ||||
if mailbox_attribute == None: | if mailbox_attribute is None: | ||||
mailbox_attribute = 'mail' | mailbox_attribute = 'mail' | ||||
if mailbox_attribute not in entry: | if mailbox_attribute not in entry: | ||||
return | return | ||||
if not 'kolabinetorgperson' in entry['objectclass']: | if 'kolabinetorgperson' not in entry['objectclass']: | ||||
return | return | ||||
imap = IMAP() | imap = IMAP() | ||||
Context not available. |