bug: fix vnish MAC not working on some versions.
This commit is contained in:
@@ -127,16 +127,6 @@ class VNish(BMMiner):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
async def _get_mac(self, web_summary: dict = None) -> str:
|
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:
|
if web_summary is not None:
|
||||||
try:
|
try:
|
||||||
mac = web_summary["system"]["network_status"]["mac"]
|
mac = web_summary["system"]["network_status"]["mac"]
|
||||||
@@ -144,6 +134,15 @@ class VNish(BMMiner):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
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:
|
async def _get_hostname(self, web_summary: dict = None) -> str:
|
||||||
if web_summary is None:
|
if web_summary is None:
|
||||||
web_info = await self.web.info()
|
web_info = await self.web.info()
|
||||||
|
|||||||
Reference in New Issue
Block a user