mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-06 04:54:48 +08:00
Show git API errors
This commit is contained in:
parent
17ab7e4b7c
commit
5060b59711
1 changed files with 4 additions and 0 deletions
|
@ -34,6 +34,10 @@ def download_restic_binaries(arch: str = "amd64") -> bool:
|
|||
f"https://api.github.com/repos/{org}/{repo}/releases/latest"
|
||||
)
|
||||
# print("RESPONSE: ", response)
|
||||
if response.status_code != 200:
|
||||
print(f"ERROR: Cannot get latest restic release: {response.status_code}")
|
||||
print("RESPONSE TEXT: ", response.text)
|
||||
return False
|
||||
json_response = json.loads(response.text)
|
||||
current_version = json_response["tag_name"].lstrip("v")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue