MCPcopy
hub / github.com/borgbackup/borg / _check_upgrade

Method _check_upgrade

src/borg/cache.py:316–327  ·  view source on GitHub ↗
(self, config_path)

Source from the content-addressed store, hash-verified

314 pass
315
316 def _check_upgrade(self, config_path):
317 try:
318 cache_version = self._config.getint("cache", "version")
319 wanted_version = 1
320 if cache_version != wanted_version:
321 self.close()
322 raise Exception(
323 "%s has unexpected cache version %d (wanted: %d)." % (config_path, cache_version, wanted_version)
324 )
325 except configparser.NoSectionError:
326 self.close()
327 raise Exception("%s does not look like a Borg cache." % config_path) from None
328
329
330class Cache:

Callers 1

loadMethod · 0.95

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected