From 339a689267d15a6ecf504b98be52076cc2c78b47 Mon Sep 17 00:00:00 2001 From: Upstream Data Date: Thu, 16 Jan 2025 11:02:39 -0700 Subject: [PATCH] bug: fix possible None value from miner type when parsing hammer miners --- pyasic/miners/factory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyasic/miners/factory.py b/pyasic/miners/factory.py index 04ddeea4..44b247ec 100644 --- a/pyasic/miners/factory.py +++ b/pyasic/miners/factory.py @@ -782,6 +782,8 @@ class MinerFactory: 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: