bug: fix an issue with a possible SSH command in BOS+.

This commit is contained in:
UpstreamData
2023-07-04 10:01:24 -06:00
parent 1b7afaaf7e
commit d2bea227db

View File

@@ -1038,13 +1038,16 @@ class BOSMiner(BaseMiner):
pass pass
# get light via ssh if that fails (10x slower) # get light via ssh if that fails (10x slower)
data = ( try:
await self.send_ssh_command("cat /sys/class/leds/'Red LED'/delay_off") data = (
).strip() await self.send_ssh_command("cat /sys/class/leds/'Red LED'/delay_off")
self.light = False ).strip()
if data == "50": self.light = False
self.light = True if data == "50":
return self.light self.light = True
return self.light
except TypeError:
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]:
if not api_devs: if not api_devs: