fixed some bugs in getting ssh connections

This commit is contained in:
UpstreamData
2022-02-24 14:42:34 -07:00
parent 1ec2a2a4a6
commit 5a7dcc7fcf
4 changed files with 17 additions and 6 deletions

View File

@@ -56,10 +56,14 @@ class CGMiner(BaseMiner):
server_host_key_algs=['ssh-rsa'])
return conn
except Exception as e:
print(e)
print("Exception raised:", self.ip)
raise e
except OSError:
print(str(self.ip) + " Connection refused.")
return None
except Exception as e:
print("Exception raised:", self.ip)
raise e
async def send_ssh_command(self, cmd):
result = None