Compare commits

..

3 Commits

Author SHA1 Message Date
Upstream Data
1587f65196 version: bump version number 2022-11-01 22:52:56 -06:00
Upstream Data
5ff10c0cdd bug: fix the v2.0.4 whatsminer error codes bug to work with new versions where it was fixed. 2022-11-01 22:15:13 -06:00
UpstreamData
aa0a028564 Update .gitignore 2022-11-01 14:17:07 -06:00
3 changed files with 26 additions and 9 deletions

1
.gitignore vendored
View File

@@ -6,3 +6,4 @@ pyvenv.cfg
.env/
bin/
lib/
.idea/

View File

@@ -164,11 +164,19 @@ class BTMiner(BaseMiner):
if err_data.get("Msg"):
if err_data["Msg"].get("error_code"):
for err in err_data["Msg"]["error_code"]:
data.append(
WhatsminerError(
error_code=int(err)
if isinstance(err, dict):
for code in err:
data.append(
WhatsminerError(
error_code=int(code)
)
)
else:
data.append(
WhatsminerError(
error_code=int(err)
)
)
)
except APIError:
summary_data = await self.api.summary()
if summary_data[0].get("Error Code Count"):
@@ -350,11 +358,19 @@ class BTMiner(BaseMiner):
if err_data.get("Msg"):
if err_data["Msg"].get("error_code"):
for err in err_data["Msg"]["error_code"]:
data.errors.append(
WhatsminerError(
error_code=int(err)
if isinstance(err, dict):
for code in err:
data.errors.append(
WhatsminerError(
error_code=int(code)
)
)
else:
data.errors.append(
WhatsminerError(
error_code=int(err)
)
)
)
if devs:
temp_data = devs.get("DEVS")

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyasic"
version = "0.19.0"
version = "0.19.1"
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
authors = ["UpstreamData <brett@upstreamdata.ca>"]
repository = "https://github.com/UpstreamData/pyasic"