local status: deletemessagelist: remove broken code
This did not work and is not usefull since the purge() method was introduced in
1410a391bc
. Actually, the purge() does what deletemessagelist() was supposed to
achieve.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
fbc3b15888
commit
5aa2a883f0
@ -369,12 +369,12 @@ class SyncableAccount(Account):
|
||||
|
||||
if not globals.options.singlethreading:
|
||||
thread = InstanceLimitedThread(
|
||||
limitNamespace = "%s%s"% (
|
||||
limitNamespace="%s%s"% (
|
||||
FOLDER_NAMESPACE, self.remoterepos.getname()),
|
||||
target = syncfolder,
|
||||
name = "Folder %s [acc: %s]"% (
|
||||
target=syncfolder,
|
||||
name="Folder %s [acc: %s]"% (
|
||||
remotefolder.getexplainedname(), self),
|
||||
args = (self, remotefolder, quick)
|
||||
args=(self, remotefolder, quick)
|
||||
)
|
||||
thread.start()
|
||||
folderthreads.append(thread)
|
||||
@ -533,17 +533,8 @@ def syncfolder(account, remotefolder, quick):
|
||||
statusfolder = statusrepos.getfolder(remotefolder.getvisiblename().
|
||||
replace(remoterepos.getsep(), statusrepos.getsep()))
|
||||
statusfolder.openfiles()
|
||||
|
||||
if localfolder.get_uidvalidity() == None:
|
||||
# This is a new folder, so delete the status cache to be
|
||||
# sure we don't have a conflict.
|
||||
# TODO: This does not work. We always return a value, need
|
||||
# to rework this...
|
||||
statusfolder.deletemessagelist()
|
||||
|
||||
statusfolder.cachemessagelist()
|
||||
|
||||
|
||||
# Load local folder.
|
||||
ui.syncingfolder(remoterepos, remotefolder, localrepos, localfolder)
|
||||
|
||||
|
@ -50,10 +50,6 @@ class LocalStatusFolder(BaseFolder):
|
||||
def getfullname(self):
|
||||
return self.filename
|
||||
|
||||
def deletemessagelist(self):
|
||||
if not self.isnewfolder():
|
||||
os.unlink(self.filename)
|
||||
|
||||
# Interface from BaseFolder
|
||||
def msglist_item_initializer(self, uid):
|
||||
return {'uid': uid, 'flags': set(), 'labels': set(), 'time': 0, 'mtime': 0}
|
||||
|
@ -118,14 +118,6 @@ class LocalStatusSQLiteFolder(BaseFolder):
|
||||
def isnewfolder(self):
|
||||
return self._newfolder
|
||||
|
||||
|
||||
# Interface from LocalStatusFolder
|
||||
def deletemessagelist(self):
|
||||
"""Delete all messages in the db."""
|
||||
|
||||
self.__sql_write('DELETE FROM status')
|
||||
|
||||
|
||||
def __sql_write(self, sql, vars=None, executemany=False):
|
||||
"""Execute some SQL, retrying if the db was locked.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user