from google's website, then everything would be canceled and we go
through the disconnect code path. Sadly this means we save the cache
even though we never loaded it. This would then cause old messages to
be displayed as new.
Watching for empty caches and treating it as if the cache didn't exist
_moduleLogger.exception("While loading for %s" % self._name)
return
_moduleLogger.exception("While loading for %s" % self._name)
return
- if misc_utils.compare_versions(
+ if convs and misc_utils.compare_versions(
self.OLDEST_COMPATIBLE_FORMAT_VERSION,
misc_utils.parse_version(fileVersion),
) <= 0:
self.OLDEST_COMPATIBLE_FORMAT_VERSION,
misc_utils.parse_version(fileVersion),
) <= 0:
def save(self, path):
_moduleLogger.info("%s Saving cache" % (self._name, ))
def save(self, path):
_moduleLogger.info("%s Saving cache" % (self._name, ))
+ if not self._conversations:
+ _moduleLogger.info("%s Odd, no conversations to cache. Did we never load the cache?" % (self._name, ))
+ return
+
try:
dataToDump = (constants.__version__, constants.__build__, self._conversations)
with open(path, "wb") as f:
try:
dataToDump = (constants.__version__, constants.__build__, self._conversations)
with open(path, "wb") as f: