feature: make mara discover more consistent.

This commit is contained in:
Upstream Data
2024-04-12 13:40:10 -06:00
parent 59b80254eb
commit 84344ca883

View File

@@ -553,7 +553,16 @@ class MinerFactory:
and self._parse_web_type(x[0], x[1]) is not None,
)
if text is not None:
return self._parse_web_type(text, resp)
mtype = self._parse_web_type(text, resp)
if mtype == MinerTypes.ANTMINER:
# could still be mara
auth = httpx.DigestAuth("root", "root")
res = await self.send_web_command(
ip, "/kaonsu/v1/brief", auth=auth
)
if res is not None:
mtype = MinerTypes.MARATHON
return mtype
@staticmethod
async def _web_ping(