Skip to content

Commit

Permalink
bug: fix possible None value from miner type when parsing hammer miners
Browse files Browse the repository at this point in the history
  • Loading branch information
UpstreamData committed Jan 16, 2025
1 parent a076480 commit 339a689
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyasic/miners/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ async def _get_miner_web(self, ip: str) -> MinerTypes | None:
mtype = MinerTypes.MARATHON
if mtype == MinerTypes.HAMMER:
res = await self.get_miner_model_hammer(ip)
if res is None:
return MinerTypes.HAMMER
if "HAMMER" in res.upper():
mtype = MinerTypes.HAMMER
else:
Expand Down

0 comments on commit 339a689

Please sign in to comment.