From 70ec6d631688b29eac3d2a90d75a47b0da19479d Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Tue, 13 Aug 2024 22:41:29 +0200 Subject: [PATCH] fix: ensure dict when querying with empty tag --- coc/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coc/http.py b/coc/http.py index 824ec31d..3e863ebb 100644 --- a/coc/http.py +++ b/coc/http.py @@ -303,7 +303,7 @@ async def request(self, route, **kwargs): self.stats[route.stats_key] = perf LOG.debug("API HTTP Request: %s", str(log_info)) - data = await json_or_text(response) + data = (await json_or_text(response)) or {} data["status_code"] = response.status data["timestamp"] = datetime.utcnow().timestamp() try: