Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5216a24a6 | ||
|
|
dd175ff3a2 | ||
|
|
9b504a3157 | ||
|
|
0bc3bf20ee |
@@ -370,7 +370,9 @@ class BOSMiner(BaseMiner):
|
||||
return result.upper().strip()
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
return self.model + " (BOS)"
|
||||
if self.model is not None:
|
||||
return self.model + " (BOS)"
|
||||
return "? (BOS)"
|
||||
|
||||
async def get_version(
|
||||
self, api_version: dict = None, graphql_version: dict = None
|
||||
|
||||
@@ -26,4 +26,6 @@ class Hiveon(BMMiner):
|
||||
self.api_type = "Hiveon"
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
return self.model + " (Hiveon)"
|
||||
if self.model is not None:
|
||||
return self.model + " (Hiveon)"
|
||||
return "? (Hiveon)"
|
||||
|
||||
@@ -58,7 +58,9 @@ class VNish(BMMiner):
|
||||
self.data_locations = VNISH_DATA_LOC
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
return self.model + " (VNISH)"
|
||||
if self.model is not None:
|
||||
return self.model + " (VNish)"
|
||||
return "? (VNish)"
|
||||
|
||||
async def restart_backend(self) -> bool:
|
||||
data = await self.web.restart_vnish()
|
||||
|
||||
@@ -749,7 +749,9 @@ class MinerFactory:
|
||||
async def get_miner_model_braiins_os(self, ip: str) -> Optional[str]:
|
||||
sock_json_data = await self.send_api_command(ip, "devdetails")
|
||||
try:
|
||||
miner_model = sock_json_data["DEVDETAILS"][0]["Model"]
|
||||
miner_model = sock_json_data["DEVDETAILS"][0]["Model"].replace(
|
||||
"Bitmain ", ""
|
||||
)
|
||||
|
||||
return miner_model
|
||||
except (TypeError, LookupError):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.33.23"
|
||||
version = "0.34.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"
|
||||
|
||||
Reference in New Issue
Block a user