ci: fix vulnix GITHUB_OUTPUT format error #4

Merged
flowey merged 4 commits from flowey/fix-vulnix-again into master 2026-09-12 01:36:03 +00:00
Showing only changes of commit feae577108 - Show all commits
+5 -2
View File
@@ -33,8 +33,11 @@ def gitea(method, path, body=None):
req.add_header("Authorization", f'token {os.environ["GH_TOKEN"]}')
if data is not None:
req.add_header("Content-Type", "application/json")
with urllib.request.urlopen(req) as resp:
raw = resp.read()
try:
with urllib.request.urlopen(req) as resp:
raw = resp.read()
except urllib.error.HTTPError as e:
sys.exit(f"gitea {method} {path}: {e.code} {e.reason}\n{e.read().decode()}")
return json.loads(raw) if raw else None