mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-27 22:41:28 +00:00
feat(backups): a better error on failed snapshot retrieval
This commit is contained in:
parent
cc09e933ed
commit
39a97cf6d8
|
@ -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:])
|
||||
|
|
Loading…
Reference in a new issue