bug: fix possible missing models.
This commit is contained in:
@@ -370,7 +370,9 @@ class BOSMiner(BaseMiner):
|
|||||||
return result.upper().strip()
|
return result.upper().strip()
|
||||||
|
|
||||||
async def get_model(self) -> Optional[str]:
|
async def get_model(self) -> Optional[str]:
|
||||||
return self.model + " (BOS)"
|
if self.model is not None:
|
||||||
|
return self.model + " (BOS)"
|
||||||
|
return "? (BOS)"
|
||||||
|
|
||||||
async def get_version(
|
async def get_version(
|
||||||
self, api_version: dict = None, graphql_version: dict = None
|
self, api_version: dict = None, graphql_version: dict = None
|
||||||
|
|||||||
@@ -26,4 +26,6 @@ class Hiveon(BMMiner):
|
|||||||
self.api_type = "Hiveon"
|
self.api_type = "Hiveon"
|
||||||
|
|
||||||
async def get_model(self) -> Optional[str]:
|
async def get_model(self) -> Optional[str]:
|
||||||
return self.model + " (Hiveon)"
|
if self.model is not None:
|
||||||
|
return self.model + " (Hiveon)"
|
||||||
|
return "? (Hiveon)"
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ class VNish(BMMiner):
|
|||||||
self.data_locations = VNISH_DATA_LOC
|
self.data_locations = VNISH_DATA_LOC
|
||||||
|
|
||||||
async def get_model(self) -> Optional[str]:
|
async def get_model(self) -> Optional[str]:
|
||||||
return self.model + " (VNISH)"
|
if self.model is not None:
|
||||||
|
return self.model + " (VNish)"
|
||||||
|
return "? (VNish)"
|
||||||
|
|
||||||
async def restart_backend(self) -> bool:
|
async def restart_backend(self) -> bool:
|
||||||
data = await self.web.restart_vnish()
|
data = await self.web.restart_vnish()
|
||||||
|
|||||||
Reference in New Issue
Block a user