mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 17:57:59 +00:00
fix borg config --cache (minimal change)
this was broken by previous changeset.
now doing just a minimal change for better diff display,
see also next commit.
(cherry picked from commit 697bb36402
)
This commit is contained in:
parent
219fce3fe8
commit
0405c1a1bb
1 changed files with 8 additions and 0 deletions
|
@ -1573,6 +1573,11 @@ def cache_validate(section, name, value=None, check_value=True):
|
|||
section = args.cache and "cache" or "repository"
|
||||
name = args.name
|
||||
|
||||
if args.cache:
|
||||
manifest, key = Manifest.load(repository, (Manifest.Operation.WRITE,))
|
||||
assert_secure(repository, manifest)
|
||||
cache = Cache(repository, key, manifest, lock_wait=self.lock_wait)
|
||||
|
||||
if args.cache:
|
||||
cache.cache_config.load()
|
||||
config = cache.cache_config._config
|
||||
|
@ -1601,6 +1606,9 @@ def cache_validate(section, name, value=None, check_value=True):
|
|||
except (configparser.NoOptionError, configparser.NoSectionError) as e:
|
||||
print(e, file=sys.stderr)
|
||||
return EXIT_WARNING
|
||||
|
||||
if args.cache:
|
||||
cache.close()
|
||||
return EXIT_SUCCESS
|
||||
|
||||
def do_debug_info(self, args):
|
||||
|
|
Loading…
Reference in a new issue