fixed a bug with model not reading if there are no hashboards in the miner
This commit is contained in:
@@ -95,6 +95,7 @@ class BOSMiner(BaseMiner):
|
||||
return self.model + " (BOS)"
|
||||
version_data = await self.api.devdetails()
|
||||
if version_data:
|
||||
if not version_data["DEVDETAILS"] == []:
|
||||
self.model = version_data["DEVDETAILS"][0]["Model"].replace("Antminer ", "")
|
||||
return self.model + " (BOS)"
|
||||
return None
|
||||
|
||||
@@ -131,6 +131,7 @@ class MinerFactory:
|
||||
if data["VERSION"][0].get("Type"):
|
||||
model = data["VERSION"][0]["Type"]
|
||||
else:
|
||||
if "DEVDETAILS" in data.keys() and not data["DEVDETAILS"] == []:
|
||||
if not data["DEVDETAILS"][0]["Model"] == "":
|
||||
model = data["DEVDETAILS"][0]["Model"]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user