fix: handle empty release asset delete responses
All checks were successful
OTA build / build-ota (push) Successful in 7m11s
All checks were successful
OTA build / build-ota (push) Successful in 7m11s
This commit is contained in:
@@ -93,7 +93,14 @@ jobs:
|
||||
payload = None if data is None else json.dumps(data).encode()
|
||||
r = Request(url, data=payload, headers=h, method=method)
|
||||
with urlopen(r, timeout=120) as resp:
|
||||
return json.loads(resp.read().decode()) if resp.readable() else None
|
||||
body = resp.read()
|
||||
if not body:
|
||||
return None
|
||||
text = body.decode()
|
||||
try:
|
||||
return json.loads(text)
|
||||
except json.JSONDecodeError:
|
||||
return text
|
||||
|
||||
try:
|
||||
release = req(f"{api}/releases/tags/{tag}")
|
||||
|
||||
Reference in New Issue
Block a user