Set BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK before checking repos

This commit is contained in:
Timothée Floure 2020-11-20 17:23:41 +01:00
parent 2017615624
commit 7aea821e35
Signed by: tfloure
GPG Key ID: 4502C902C00A1E12
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ if __name__ == '__main__':
try:
print(">> Querying borg for {}...".format(repository_name), end='')
raw_borg_json = subprocess.check_output(['borg', 'info', '--json', repository_path])
env = os.environ
env["BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK"] = "yes"
raw_borg_json = subprocess.check_output(['borg', 'info', '--json', repository_path], env=env)
info = json.loads(raw_borg_json)
stats = info['cache']['stats']