fixed a bug with model not reading if there are no hashboards in the miner

This commit is contained in:
Dewey Cox
2022-01-11 12:58:20 -07:00
parent 0711bcb259
commit 53af55a87d
2 changed files with 8 additions and 6 deletions

View File

@@ -131,10 +131,11 @@ class MinerFactory:
if data["VERSION"][0].get("Type"):
model = data["VERSION"][0]["Type"]
else:
if not data["DEVDETAILS"][0]["Model"] == "":
model = data["DEVDETAILS"][0]["Model"]
else:
model = data["DEVDETAILS"][0]["Driver"]
if "DEVDETAILS" in data.keys() and not data["DEVDETAILS"] == []:
if not data["DEVDETAILS"][0]["Model"] == "":
model = data["DEVDETAILS"][0]["Model"]
else:
model = data["DEVDETAILS"][0]["Driver"]
else:
data = await self._send_api_command(str(ip), "version")
model = data["VERSION"][0]["Type"]