From a731bedad0c65b78d0c0c41c4cc37c441d6847d0 Mon Sep 17 00:00:00 2001 From: Simone Date: Tue, 5 May 2026 00:34:33 +0200 Subject: [PATCH] fix: handle empty 204 response body in Gitea API calls --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e31633..5050426 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -208,7 +208,8 @@ jobs: }, ) with urllib.request.urlopen(req) as resp: - return json.loads(resp.read().decode("utf-8")) + raw = resp.read() + return json.loads(raw) if raw else {} def upload_asset(rid, path, auth_scheme): p = Path(path) @@ -231,7 +232,8 @@ jobs: }, ) with urllib.request.urlopen(req) as resp: - return json.loads(resp.read().decode("utf-8")) + raw = resp.read() + return json.loads(raw) if raw else {} auth_scheme = None last_error = None