Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bd031b33d | ||
|
|
e2f07818cc | ||
|
|
75056cfff5 | ||
|
|
7fbcb0dbd2 |
@@ -136,17 +136,16 @@ class BaseMinerRPCAPI:
|
||||
self.send_command(cmd, allow_warning=allow_warning)
|
||||
)
|
||||
|
||||
await asyncio.gather(*[tasks[cmd] for cmd in tasks], return_exceptions=True)
|
||||
results = await asyncio.gather(
|
||||
*[tasks[cmd] for cmd in tasks], return_exceptions=True
|
||||
)
|
||||
|
||||
data = {}
|
||||
for cmd in tasks:
|
||||
try:
|
||||
result = tasks[cmd].result()
|
||||
for cmd, result in zip(tasks.keys(), results):
|
||||
if not isinstance(result, (APIError, Exception)):
|
||||
if result is None or result == {}:
|
||||
result = {}
|
||||
data[cmd] = [result]
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -141,17 +141,16 @@ class AuradineWebAPI(BaseWebAPI):
|
||||
self.send_command(cmd, allow_warning=allow_warning)
|
||||
)
|
||||
|
||||
await asyncio.gather(*[tasks[cmd] for cmd in tasks], return_exceptions=True)
|
||||
results = await asyncio.gather(
|
||||
*[tasks[cmd] for cmd in tasks], return_exceptions=True
|
||||
)
|
||||
|
||||
data = {"multicommand": True}
|
||||
for cmd in tasks:
|
||||
try:
|
||||
result = tasks[cmd].result()
|
||||
for cmd, result in zip(tasks.keys(), results):
|
||||
if not isinstance(result, (APIError, Exception)):
|
||||
if result is None or result == {}:
|
||||
result = {}
|
||||
data[cmd] = result
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -84,13 +84,13 @@ class BOSerWebAPI(BaseWebAPI):
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
await asyncio.gather(*[t for t in tasks.values()], return_exceptions=True)
|
||||
results = await asyncio.gather(
|
||||
*[t for t in tasks.values()], return_exceptions=True
|
||||
)
|
||||
|
||||
for cmd in tasks:
|
||||
try:
|
||||
result[cmd] = await tasks[cmd]
|
||||
except (GRPCError, APIError, ConnectionError):
|
||||
pass
|
||||
for cmd, task_result in zip(tasks.keys(), results):
|
||||
if not isinstance(task_result, (GRPCError, APIError, ConnectionError)):
|
||||
result[cmd] = task_result
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@@ -71,17 +71,16 @@ class ESPMinerWebAPI(BaseWebAPI):
|
||||
self.send_command(cmd, allow_warning=allow_warning)
|
||||
)
|
||||
|
||||
await asyncio.gather(*[tasks[cmd] for cmd in tasks], return_exceptions=True)
|
||||
results = await asyncio.gather(
|
||||
*[tasks[cmd] for cmd in tasks], return_exceptions=True
|
||||
)
|
||||
|
||||
data = {"multicommand": True}
|
||||
for cmd in tasks:
|
||||
try:
|
||||
result = tasks[cmd].result()
|
||||
for cmd, result in zip(tasks.keys(), results):
|
||||
if not isinstance(result, (APIError, Exception)):
|
||||
if result is None or result == {}:
|
||||
result = {}
|
||||
data[cmd] = result
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "pyasic"
|
||||
version = "0.76.7"
|
||||
version = "0.76.9"
|
||||
|
||||
description = "A simplified and standardized interface for Bitcoin ASICs."
|
||||
authors = [{name = "UpstreamData", email = "brett@upstreamdata.ca"}]
|
||||
|
||||
Reference in New Issue
Block a user