Skip to content

Commit

Permalink
bug: fix unneeded error handling when getting hostname fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
b-rowan committed Jan 23, 2024
1 parent 1c5c39f commit e2b0a76
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyasic/miners/backends/braiins_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ async def _get_fw_ver(self, web_bos_info: dict = None) -> Optional[str]:
async def _get_hostname(self) -> Union[str, None]:
try:
hostname = (await self.ssh.get_hostname()).strip()
except AttributeError:
return None
except Exception as e:
logging.error(f"{self} - Getting hostname failed: {e}")
return None
Expand Down

0 comments on commit e2b0a76

Please sign in to comment.