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)))
|
||||
except APIError:
|
||||
summary_data = await self.api.summary()
|
||||
if summary_data.get("SUMMARY"):
|
||||
summary_data = summary_data["SUMMARY"]
|
||||
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"]):
|
||||
print(i)
|
||||
if summary_data[0].get(f"Error Code {i}"):
|
||||
if not summary_data[0][f"Error Code {i}"] == "":
|
||||
data.append(
|
||||
|
||||
Reference in New Issue
Block a user