Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b7afaaf7e | ||
|
|
96898d639c |
@@ -494,7 +494,7 @@ class BOSMiner(BaseMiner):
|
|||||||
if graphql_version:
|
if graphql_version:
|
||||||
try:
|
try:
|
||||||
fw_ver = graphql_version["data"]["bos"]["info"]["version"]["full"]
|
fw_ver = graphql_version["data"]["bos"]["info"]["version"]["full"]
|
||||||
except KeyError:
|
except (KeyError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not fw_ver:
|
if not fw_ver:
|
||||||
@@ -523,7 +523,7 @@ class BOSMiner(BaseMiner):
|
|||||||
try:
|
try:
|
||||||
hostname = graphql_hostname["data"]["bos"]["hostname"]
|
hostname = graphql_hostname["data"]["bos"]["hostname"]
|
||||||
return hostname
|
return hostname
|
||||||
except KeyError:
|
except (TypeError, KeyError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -563,7 +563,7 @@ class BOSMiner(BaseMiner):
|
|||||||
),
|
),
|
||||||
2,
|
2,
|
||||||
)
|
)
|
||||||
except (KeyError, IndexError, ValueError):
|
except (LookupError, ValueError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# get hr from API
|
# get hr from API
|
||||||
@@ -617,7 +617,7 @@ class BOSMiner(BaseMiner):
|
|||||||
boards = graphql_boards["data"]["bosminer"]["info"]["workSolver"][
|
boards = graphql_boards["data"]["bosminer"]["info"]["workSolver"][
|
||||||
"childSolvers"
|
"childSolvers"
|
||||||
]
|
]
|
||||||
except (KeyError, IndexError):
|
except (TypeError, LookupError):
|
||||||
boards = None
|
boards = None
|
||||||
|
|
||||||
if boards:
|
if boards:
|
||||||
@@ -732,7 +732,7 @@ class BOSMiner(BaseMiner):
|
|||||||
return graphql_wattage["data"]["bosminer"]["info"]["workSolver"][
|
return graphql_wattage["data"]["bosminer"]["info"]["workSolver"][
|
||||||
"power"
|
"power"
|
||||||
]["approxConsumptionW"]
|
]["approxConsumptionW"]
|
||||||
except (KeyError, TypeError):
|
except (LookupError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not api_tunerstatus:
|
if not api_tunerstatus:
|
||||||
@@ -765,7 +765,7 @@ class BOSMiner(BaseMiner):
|
|||||||
return graphql_wattage_limit["data"]["bosminer"]["info"]["workSolver"][
|
return graphql_wattage_limit["data"]["bosminer"]["info"]["workSolver"][
|
||||||
"power"
|
"power"
|
||||||
]["limitW"]
|
]["limitW"]
|
||||||
except (KeyError, TypeError):
|
except (LookupError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not api_tunerstatus:
|
if not api_tunerstatus:
|
||||||
@@ -801,7 +801,7 @@ class BOSMiner(BaseMiner):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except KeyError:
|
except (LookupError, TypeError):
|
||||||
pass
|
pass
|
||||||
return fans
|
return fans
|
||||||
|
|
||||||
@@ -941,7 +941,7 @@ class BOSMiner(BaseMiner):
|
|||||||
boards = graphql_errors["data"]["bosminer"]["info"]["workSolver"][
|
boards = graphql_errors["data"]["bosminer"]["info"]["workSolver"][
|
||||||
"childSolvers"
|
"childSolvers"
|
||||||
]
|
]
|
||||||
except (KeyError, IndexError):
|
except (LookupError, TypeError):
|
||||||
boards = None
|
boards = None
|
||||||
|
|
||||||
if boards:
|
if boards:
|
||||||
@@ -1034,7 +1034,7 @@ class BOSMiner(BaseMiner):
|
|||||||
try:
|
try:
|
||||||
self.light = graphql_fault_light["data"]["bos"]["faultLight"]
|
self.light = graphql_fault_light["data"]["bos"]["faultLight"]
|
||||||
return self.light
|
return self.light
|
||||||
except (TypeError, KeyError, ValueError, IndexError):
|
except (TypeError, ValueError, LookupError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# get light via ssh if that fails (10x slower)
|
# get light via ssh if that fails (10x slower)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pyasic"
|
name = "pyasic"
|
||||||
version = "0.36.8"
|
version = "0.36.9"
|
||||||
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
|
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>"]
|
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
||||||
repository = "https://github.com/UpstreamData/pyasic"
|
repository = "https://github.com/UpstreamData/pyasic"
|
||||||
|
|||||||
Reference in New Issue
Block a user