bug: fix a missed key step in btminer get errors.
This commit is contained in:
@@ -171,8 +171,12 @@ class BTMiner(BaseMiner):
|
|||||||
data.append(WhatsminerError(error_code=int(err)))
|
data.append(WhatsminerError(error_code=int(err)))
|
||||||
except APIError:
|
except APIError:
|
||||||
summary_data = await self.api.summary()
|
summary_data = await self.api.summary()
|
||||||
|
if summary_data.get("SUMMARY"):
|
||||||
|
summary_data = summary_data["SUMMARY"]
|
||||||
if summary_data[0].get("Error Code Count"):
|
if summary_data[0].get("Error Code Count"):
|
||||||
|
print(summary_data[0].get("Error Code Count"))
|
||||||
for i in range(summary_data[0]["Error Code Count"]):
|
for i in range(summary_data[0]["Error Code Count"]):
|
||||||
|
print(i)
|
||||||
if summary_data[0].get(f"Error Code {i}"):
|
if summary_data[0].get(f"Error Code {i}"):
|
||||||
if not summary_data[0][f"Error Code {i}"] == "":
|
if not summary_data[0][f"Error Code {i}"] == "":
|
||||||
data.append(
|
data.append(
|
||||||
|
|||||||
Reference in New Issue
Block a user