bug: fix vnish MAC not working on some versions.

This commit is contained in:
Brett Rowan
2024-03-23 20:25:26 -06:00
parent 59346d641f
commit 354ab793a2

View File

@@ -127,16 +127,6 @@ class VNish(BMMiner):
return False
async def _get_mac(self, web_summary: dict = None) -> str:
if web_summary is None:
web_info = await self.web.info()
if web_info is not None:
try:
mac = web_info["system"]["network_status"]["mac"]
return mac
except KeyError:
pass
if web_summary is not None:
try:
mac = web_summary["system"]["network_status"]["mac"]
@@ -144,6 +134,15 @@ class VNish(BMMiner):
except KeyError:
pass
web_info = await self.web.info()
if web_info is not None:
try:
mac = web_info["system"]["network_status"]["mac"]
return mac
except KeyError:
pass
async def _get_hostname(self, web_summary: dict = None) -> str:
if web_summary is None:
web_info = await self.web.info()