bug: fix json decode error possibility with avalon nanos

This commit is contained in:
Upstream Data
2025-03-03 15:04:13 -07:00
parent e0abed4f93
commit 276a476fab

View File

@@ -64,7 +64,7 @@ class AvalonMinerWebAPI(BaseWebAPI):
resp = await client.get(url)
raw_data = resp.text.replace("minerinfoCallback(", "").replace(");", "")
return json.loads(raw_data)
except httpx.HTTPError:
except (httpx.HTTPError, json.JSONDecodeError):
pass
return {}