bug: fix possible missing value for bitmain work mode when checking is_mining.

This commit is contained in:
UpstreamData
2023-10-12 13:19:11 -06:00
parent 850c266555
commit 4600e7d953

View File

@@ -274,7 +274,11 @@ class AntminerModern(BMMiner):
if web_get_conf:
try:
return False if int(web_get_conf["bitmain-work-mode"]) == 1 else True
if web_get_conf["bitmain-work-mode"].isdigit():
return (
False if int(web_get_conf["bitmain-work-mode"]) == 1 else True
)
return False
except LookupError:
pass