feat(backups): a better error on failed snapshot retrieval

l10n
Houkime 2023-02-22 13:46:28 +00:00
parent cc09e933ed
commit 39a97cf6d8
1 changed files with 3 additions and 1 deletions

View File

@ -141,6 +141,8 @@ class ResticBackuper(AbstractBackuper):
def parse_snapshot_output(self, output: str) -> object:
if "[" not in output:
raise ValueError("There is no json in the restic snapshot output")
raise ValueError(
"There is no json in the restic snapshot output : " + output
)
starting_index = output.find("[")
return json.loads(output[starting_index:])