bug: fix some issues with early version of whatsminers, and handle some possible errors with BOS.

This commit is contained in:
UpstreamData
2023-10-03 11:11:32 -06:00
parent 39e3e249f8
commit 7e758720f0
2 changed files with 3 additions and 2 deletions

View File

@@ -1043,7 +1043,7 @@ class BOSMiner(BaseMiner):
if data == "50":
self.light = True
return self.light
except TypeError:
except (TypeError, AttributeError):
return self.light
async def get_nominal_hashrate(self, api_devs: dict = None) -> Optional[float]:

View File

@@ -442,7 +442,8 @@ class BTMiner(BaseMiner):
if api_summary:
try:
return api_summary["SUMMARY"][0]["Power"]
wattage = api_summary["SUMMARY"][0]["Power"]
return wattage if not wattage == -1 else None
except (KeyError, IndexError):
pass