diff --git a/offlineimap/folder/LocalStatus.py b/offlineimap/folder/LocalStatus.py index fbe2e24..fd4228c 100644 --- a/offlineimap/folder/LocalStatus.py +++ b/offlineimap/folder/LocalStatus.py @@ -65,9 +65,11 @@ class LocalStatusFolder(BaseFolder): file = open(self.filename, "rt") self.messagelist = {} line = file.readline().strip() - if not line and not line.read(): + 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)