fixed a bug with get_hashrate

This commit is contained in:
UpstreamData
2021-11-03 09:49:21 -06:00
parent 3fb37f2741
commit 9c3faca667

View File

@@ -65,9 +65,13 @@ class BOSminer(BaseMiner):
self.config = cfg
async def get_hostname(self) -> str:
async with (await self._get_ssh_connection()) as conn:
data = await conn.run('cat /proc/sys/kernel/hostname')
return data.stdout.strip()
try:
async with (await self._get_ssh_connection()) as conn:
data = await conn.run('cat /proc/sys/kernel/hostname')
return data.stdout.strip()
except Exception as e:
print(self.ip, e)
return "BOSMiner Unknown"
async def send_config(self, yaml_config) -> None:
toml_conf = await general_config_convert_bos(yaml_config)