Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e852588eeb | ||
|
|
08b9bfd854 | ||
|
|
7ee2f3a29a | ||
|
|
5ee6a38f39 |
@@ -448,16 +448,21 @@ class MinerFactory(metaclass=Singleton):
|
||||
api = "BOSMiner+"
|
||||
except (KeyError, TypeError, ValueError, IndexError):
|
||||
pass
|
||||
|
||||
if not model:
|
||||
# braiins OS bug check just in case
|
||||
if "s9" in devdetails["STATUS"][0]["Description"]:
|
||||
model = "ANTMINER S9"
|
||||
if "s17" in version["STATUS"][0]["Description"]:
|
||||
model = "ANTMINER S17"
|
||||
if not api:
|
||||
if "boser" in version["STATUS"][0]["Description"]:
|
||||
api = "BOSMiner+"
|
||||
try:
|
||||
if not model:
|
||||
# braiins OS bug check just in case
|
||||
if "s9" in devdetails["STATUS"][0]["Description"]:
|
||||
model = "ANTMINER S9"
|
||||
if "s17" in version["STATUS"][0]["Description"]:
|
||||
model = "ANTMINER S17"
|
||||
except (KeyError, TypeError, ValueError, IndexError):
|
||||
pass
|
||||
try:
|
||||
if not api:
|
||||
if "boser" in version["STATUS"][0]["Description"]:
|
||||
api = "BOSMiner+"
|
||||
except (KeyError, TypeError, ValueError, IndexError):
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
_model = await self.__get_model_from_graphql(ip)
|
||||
@@ -572,7 +577,7 @@ class MinerFactory(metaclass=Singleton):
|
||||
try:
|
||||
if data["version"][0]["STATUS"][0]["Msg"] == "Disconnected":
|
||||
return data["devdetails"], data["version"]
|
||||
except KeyError:
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
raise APIError(validation[1])
|
||||
# copy each part of the main command to devdetails and version
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.21.13"
|
||||
version = "0.21.15"
|
||||
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