bug: fix a bug with hostname gathering on some Avalons.

This commit is contained in:
UpstreamData
2023-08-28 08:31:27 -06:00
parent b3d9b6ff7e
commit 3d6eebf06e

View File

@@ -179,11 +179,12 @@ class CGMinerAvalon(CGMiner):
pass pass
async def get_hostname(self, mac: str = None) -> Optional[str]: async def get_hostname(self, mac: str = None) -> Optional[str]:
if not mac: return None
mac = await self.get_mac() # if not mac:
# mac = await self.get_mac()
if mac: #
return f"Avalon{mac.replace(':', '')[-6:]}" # if mac:
# return f"Avalon{mac.replace(':', '')[-6:]}"
async def get_hashrate(self, api_devs: dict = None) -> Optional[float]: async def get_hashrate(self, api_devs: dict = None) -> Optional[float]:
if not api_devs: if not api_devs: