bug: fix unneeded error handling when getting hostname fails.
This commit is contained in:
@@ -334,6 +334,8 @@ class BOSMiner(BaseMiner):
|
|||||||
async def _get_hostname(self) -> Union[str, None]:
|
async def _get_hostname(self) -> Union[str, None]:
|
||||||
try:
|
try:
|
||||||
hostname = (await self.ssh.get_hostname()).strip()
|
hostname = (await self.ssh.get_hostname()).strip()
|
||||||
|
except AttributeError:
|
||||||
|
return None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"{self} - Getting hostname failed: {e}")
|
logging.error(f"{self} - Getting hostname failed: {e}")
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user