add debug info
This commit is contained in:
parent
ef7d748a5f
commit
7107182d52
1 changed files with 12 additions and 0 deletions
|
@ -302,11 +302,23 @@ class BackupImap:
|
|||
'last_update' in cached_data and
|
||||
cached_data['last_update'] + self.config['max_cache_age'] > time.time()
|
||||
):
|
||||
self._log.debug(
|
||||
"Cache file '%s' is too old, initializing cache data.",
|
||||
self.config['cache_file']
|
||||
)
|
||||
cached_data = self._default_data
|
||||
except json.decoder.JSONDecodeError:
|
||||
self._log.debug(
|
||||
"Cache file '%s' doesn't contain valid JSON, initializing cache data.",
|
||||
self.config['cache_file']
|
||||
)
|
||||
cached_data = self._default_data
|
||||
return cached_data
|
||||
else:
|
||||
self._log.debug(
|
||||
"Cache file '%s' doesn't exist, initializing cache data.",
|
||||
self.config['cache_file']
|
||||
)
|
||||
return self._default_data
|
||||
|
||||
def _save_cached_data(self, data):
|
||||
|
|
Loading…
Reference in a new issue