mirror of https://github.com/borgbackup/borg.git
fix borg config --cache (make sure cache gets closed via try/finally)
This commit is contained in:
parent
697bb36402
commit
322b442641
|
@ -1774,6 +1774,7 @@ class Archiver:
|
|||
assert_secure(repository, manifest)
|
||||
cache = Cache(repository, key, manifest, lock_wait=self.lock_wait)
|
||||
|
||||
try:
|
||||
if args.cache:
|
||||
cache.cache_config.load()
|
||||
config = cache.cache_config._config
|
||||
|
@ -1802,10 +1803,10 @@ class Archiver:
|
|||
except (configparser.NoOptionError, configparser.NoSectionError) as e:
|
||||
print(e, file=sys.stderr)
|
||||
return EXIT_WARNING
|
||||
|
||||
return EXIT_SUCCESS
|
||||
finally:
|
||||
if args.cache:
|
||||
cache.close()
|
||||
return EXIT_SUCCESS
|
||||
|
||||
def do_debug_info(self, args):
|
||||
"""display system information for debugging / bug reports"""
|
||||
|
|
Loading…
Reference in New Issue