diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py index cab22c2..689c94b 100644 --- a/offlineimap/folder/Base.py +++ b/offlineimap/folder/Base.py @@ -116,8 +116,8 @@ class BaseFolder(object): function is not threadsafe. So don't attempt to call it from concurrent threads.""" - if self.getsaveduidvalidity() != None: - return self.getsaveduidvalidity() == self.get_uidvalidity() + if self.get_saveduidvalidity() != None: + return self.get_saveduidvalidity() == self.get_uidvalidity() else: self.saveuidvalidity() return 1 @@ -126,7 +126,11 @@ class BaseFolder(object): return os.path.join(self.repository.getuiddir(), self.getfolderbasename()) - def getsaveduidvalidity(self): + def get_saveduidvalidity(self): + """Return the previously cached UIDVALIDITY value + + :returns: UIDVALIDITY as (long) number or None, if None had been + saved yet.""" if hasattr(self, '_base_saved_uidvalidity'): return self._base_saved_uidvalidity uidfilename = self._getuidfilename() diff --git a/offlineimap/ui/Machine.py b/offlineimap/ui/Machine.py index 271629c..4bf1418 100644 --- a/offlineimap/ui/Machine.py +++ b/offlineimap/ui/Machine.py @@ -70,7 +70,7 @@ class MachineUI(UIBase): def validityproblem(s, folder): s._printData('validityproblem', "%s\n%s\n%s\n%s" % \ (folder.getname(), folder.getrepository().getname(), - folder.getsaveduidvalidity(), folder.get_uidvalidity())) + folder.get_saveduidvalidity(), folder.get_uidvalidity())) def connecting(s, hostname, port): s._printData('connecting', "%s\n%s" % (hostname, str(port))) diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index 1cdd94b..7cd8895 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -311,7 +311,7 @@ class UIBase(object): "(saved %d; got %d); skipping it. Please see FAQ " "and manual on how to handle this." % \ (folder, folder.getrepository(), - folder.getsaveduidvalidity(), folder.get_uidvalidity())) + folder.get_saveduidvalidity(), folder.get_uidvalidity())) def loadmessagelist(self, repos, folder): self.logger.debug("Loading message list for %s[%s]" % (