bug: fix some issues with early version of whatsminers, and handle some possible errors with BOS.
This commit is contained in:
@@ -1043,7 +1043,7 @@ class BOSMiner(BaseMiner):
|
|||||||
if data == "50":
|
if data == "50":
|
||||||
self.light = True
|
self.light = True
|
||||||
return self.light
|
return self.light
|
||||||
except TypeError:
|
except (TypeError, AttributeError):
|
||||||
return self.light
|
return self.light
|
||||||
|
|
||||||
async def get_nominal_hashrate(self, api_devs: dict = None) -> Optional[float]:
|
async def get_nominal_hashrate(self, api_devs: dict = None) -> Optional[float]:
|
||||||
|
|||||||
@@ -442,7 +442,8 @@ class BTMiner(BaseMiner):
|
|||||||
|
|
||||||
if api_summary:
|
if api_summary:
|
||||||
try:
|
try:
|
||||||
return api_summary["SUMMARY"][0]["Power"]
|
wattage = api_summary["SUMMARY"][0]["Power"]
|
||||||
|
return wattage if not wattage == -1 else None
|
||||||
except (KeyError, IndexError):
|
except (KeyError, IndexError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user