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:
Nicolas Sebrecht 2016-07-18 18:40:17 +02:00
parent 2f3c01f0be
commit 59b712ecbc
2 changed files with 11 additions and 12 deletions

View File

@ -83,9 +83,9 @@ class BaseFolder(object):
# Passes for syncmessagesto. # Passes for syncmessagesto.
self.syncmessagesto_passes = [ self.syncmessagesto_passes = [
('copying messages' , self.__syncmessagesto_copy), self.__syncmessagesto_copy,
('deleting messages' , self.__syncmessagesto_delete), self.__syncmessagesto_delete,
('syncing flags' , self.__syncmessagesto_flags) self.__syncmessagesto_flags,
] ]
def getname(self): def getname(self):
@ -1081,7 +1081,7 @@ class BaseFolder(object):
:param statusfolder: LocalStatus instance to sync against. :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. # Bail out on CTRL-C or SIGTERM.
if offlineimap.accounts.Account.abort_NOW_signal.is_set(): if offlineimap.accounts.Account.abort_NOW_signal.is_set():
break break
@ -1094,7 +1094,7 @@ class BaseFolder(object):
raise raise
self.ui.error(e, exc_info()[2]) self.ui.error(e, exc_info()[2])
except Exception as e: 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)) (self, self.accountname))
raise # Raise unknown Exceptions so we can fix them. raise # Raise unknown Exceptions so we can fix them.

View File

@ -19,8 +19,7 @@ import re
import six import six
from sys import exc_info from sys import exc_info
from offlineimap import imaputil, OfflineImapError from offlineimap import imaputil, imaplibutil, OfflineImapError
from offlineimap import imaplibutil
import offlineimap.accounts import offlineimap.accounts
from .IMAP import IMAPFolder from .IMAP import IMAPFolder
@ -57,7 +56,7 @@ class GmailFolder(IMAPFolder):
# if synclabels is enabled, add a 4th pass to sync labels # if synclabels is enabled, add a 4th pass to sync labels
if self.synclabels: if self.synclabels:
self.imap_query.insert(0, 'X-GM-LABELS') 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 # Labels to be left alone
ignorelabels = self.repository.account.getconf('ignorelabels', '') ignorelabels = self.repository.account.getconf('ignorelabels', '')