Class LocalStatusFolder: remove duplicate cachemessagelist()
Remained from GMail label sync merge. Pointyhat-to: Eygene Ryabinkin Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
parent
b982549e4d
commit
8b4f86be67
@ -56,23 +56,6 @@ class LocalStatusFolder(BaseFolder):
|
|||||||
if not self.isnewfolder():
|
if not self.isnewfolder():
|
||||||
os.unlink(self.filename)
|
os.unlink(self.filename)
|
||||||
|
|
||||||
# Interface from BaseFolder
|
|
||||||
def cachemessagelist(self):
|
|
||||||
if self.isnewfolder():
|
|
||||||
self.messagelist = {}
|
|
||||||
return
|
|
||||||
file = open(self.filename, "rt")
|
|
||||||
self.messagelist = {}
|
|
||||||
line = file.readline().strip()
|
|
||||||
if not line:
|
|
||||||
# The status file is empty - should not have happened,
|
|
||||||
# but somehow did.
|
|
||||||
errstr = "Cache file '%s' is empty. Closing..." % self.filename
|
|
||||||
self.ui.warn(errstr)
|
|
||||||
file.close()
|
|
||||||
return
|
|
||||||
assert(line == magicline)
|
|
||||||
|
|
||||||
|
|
||||||
def readstatus_v1(self, fp):
|
def readstatus_v1(self, fp):
|
||||||
"""
|
"""
|
||||||
@ -120,6 +103,7 @@ class LocalStatusFolder(BaseFolder):
|
|||||||
self.messagelist[uid] = {'uid': uid, 'flags': flags, 'mtime': mtime, 'labels': labels}
|
self.messagelist[uid] = {'uid': uid, 'flags': flags, 'mtime': mtime, 'labels': labels}
|
||||||
|
|
||||||
|
|
||||||
|
# Interface from BaseFolder
|
||||||
def cachemessagelist(self):
|
def cachemessagelist(self):
|
||||||
if self.isnewfolder():
|
if self.isnewfolder():
|
||||||
self.messagelist = {}
|
self.messagelist = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user