Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

Commit 34a3e21

Browse files
committed
bug: fix dead code in luxminer _get_mac and _get_hashrate
Remove erroneous 'return None' statements placed outside except blocks, making all subsequent logic unreachable. Same pattern was already fixed for _get_wattage in 63bf0cd.
1 parent 4e04ca9 commit 34a3e21

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyasic/miners/backends/luxminer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ async def _get_mac(self, rpc_config: dict | None = None) -> str | None:
233233
rpc_config = await self.rpc.config()
234234
except APIError:
235235
pass
236-
return None
237236

238237
if rpc_config is not None:
239238
try:
240239
return rpc_config["CONFIG"][0]["MACAddr"].upper()
241240
except KeyError:
242241
pass
242+
return None
243243

244244
async def _get_hashrate(
245245
self, rpc_summary: dict | None = None
@@ -249,7 +249,6 @@ async def _get_hashrate(
249249
rpc_summary = await self.rpc.summary()
250250
except APIError:
251251
pass
252-
return None
253252

254253
if rpc_summary is not None:
255254
try:
@@ -259,6 +258,7 @@ async def _get_hashrate(
259258
).into(self.algo.unit.default)
260259
except (LookupError, ValueError, TypeError):
261260
pass
261+
return None
262262

263263
async def _get_hashboards(self, rpc_stats: dict | None = None) -> list[HashBoard]:
264264
if self.expected_hashboards is None:

0 commit comments

Comments
 (0)