mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-23 09:16:51 +00:00
feat(backups): a better error on failed snapshot retrieval
This commit is contained in:
parent
c32353fe9b
commit
98e1c9ebaa
|
@ -141,6 +141,8 @@ class ResticBackuper(AbstractBackuper):
|
||||||
|
|
||||||
def parse_snapshot_output(self, output: str) -> object:
|
def parse_snapshot_output(self, output: str) -> object:
|
||||||
if "[" not in output:
|
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("[")
|
starting_index = output.find("[")
|
||||||
return json.loads(output[starting_index:])
|
return json.loads(output[starting_index:])
|
||||||
|
|
Loading…
Reference in a new issue