Changeset View
Changeset View
Standalone View
Standalone View
pykolab/imap/cyrus.py
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | def find_mailfolder_server(self, mailfolder): | ||||
log.debug( | log.debug( | ||||
_("Checking actual backend server for folder %s " + | _("Checking actual backend server for folder %s " + | ||||
"through annotations") % ( | "through annotations") % ( | ||||
mailfolder | mailfolder | ||||
), | ), | ||||
level=8 | level=8 | ||||
) | ) | ||||
if self.mbox.has_key(mailfolder): | if mailfolder in self.mbox: | ||||
log.debug( | log.debug( | ||||
_( | _( | ||||
"Possibly reproducing the find " + | "Possibly reproducing the find " + | ||||
"mailfolder server answer from " + | "mailfolder server answer from " + | ||||
"previously detected and stored " + | "previously detected and stored " + | ||||
"annotation value: %r" | "annotation value: %r" | ||||
) % ( | ) % ( | ||||
self.mbox[mailfolder] | self.mbox[mailfolder] | ||||
Show All 12 Lines | def find_mailfolder_server(self, mailfolder): | ||||
while 1: | while 1: | ||||
num_try += 1 | num_try += 1 | ||||
annotations = self._getannotation( | annotations = self._getannotation( | ||||
'"%s"' % (mailfolder), | '"%s"' % (mailfolder), | ||||
ann_path | ann_path | ||||
) | ) | ||||
if annotations.has_key(mailfolder): | if mailfolder in annotations: | ||||
if annotations[mailfolder].has_key(s_ann_path): | if s_ann_path in annotations[mailfolder]: | ||||
break | break | ||||
if max_tries <= num_try: | if max_tries <= num_try: | ||||
log.error( | log.error( | ||||
_("Could not get the annotations after %s tries.") % ( | _("Could not get the annotations after %s tries.") % ( | ||||
num_try | num_try | ||||
) | ) | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 373 Lines • Show Last 20 Lines |