remove dead code: the description of the passes is never used
Some minor style fixes. Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
2f3c01f0be
commit
59b712ecbc
@ -83,9 +83,9 @@ class BaseFolder(object):
|
||||
|
||||
# Passes for syncmessagesto.
|
||||
self.syncmessagesto_passes = [
|
||||
('copying messages' , self.__syncmessagesto_copy),
|
||||
('deleting messages' , self.__syncmessagesto_delete),
|
||||
('syncing flags' , self.__syncmessagesto_flags)
|
||||
self.__syncmessagesto_copy,
|
||||
self.__syncmessagesto_delete,
|
||||
self.__syncmessagesto_flags,
|
||||
]
|
||||
|
||||
def getname(self):
|
||||
@ -1081,7 +1081,7 @@ class BaseFolder(object):
|
||||
:param statusfolder: LocalStatus instance to sync against.
|
||||
"""
|
||||
|
||||
for (passdesc, action) in self.syncmessagesto_passes:
|
||||
for action in self.syncmessagesto_passes:
|
||||
# Bail out on CTRL-C or SIGTERM.
|
||||
if offlineimap.accounts.Account.abort_NOW_signal.is_set():
|
||||
break
|
||||
@ -1094,7 +1094,7 @@ class BaseFolder(object):
|
||||
raise
|
||||
self.ui.error(e, exc_info()[2])
|
||||
except Exception as e:
|
||||
self.ui.error(e, exc_info()[2], "Syncing folder %s [acc: %s]" %\
|
||||
self.ui.error(e, exc_info()[2], "Syncing folder %s [acc: %s]"%
|
||||
(self, self.accountname))
|
||||
raise # Raise unknown Exceptions so we can fix them.
|
||||
|
||||
|
@ -19,8 +19,7 @@ import re
|
||||
import six
|
||||
from sys import exc_info
|
||||
|
||||
from offlineimap import imaputil, OfflineImapError
|
||||
from offlineimap import imaplibutil
|
||||
from offlineimap import imaputil, imaplibutil, OfflineImapError
|
||||
import offlineimap.accounts
|
||||
from .IMAP import IMAPFolder
|
||||
|
||||
@ -57,7 +56,7 @@ class GmailFolder(IMAPFolder):
|
||||
# if synclabels is enabled, add a 4th pass to sync labels
|
||||
if self.synclabels:
|
||||
self.imap_query.insert(0, 'X-GM-LABELS')
|
||||
self.syncmessagesto_passes.append(('syncing labels', self.syncmessagesto_labels))
|
||||
self.syncmessagesto_passes.append(self.syncmessagesto_labels)
|
||||
|
||||
# Labels to be left alone
|
||||
ignorelabels = self.repository.account.getconf('ignorelabels', '')
|
||||
|
Loading…
Reference in New Issue
Block a user