Update ssh_local.py

This commit is contained in:
dami
2025-05-24 01:03:08 +08:00
parent 1390afae0e
commit d11dbbccb7
+13 -10
View File
@@ -117,14 +117,17 @@ class ssh_local(object):
if not self.__ssh:
self.__ssh = self.connectSsh()
if hasattr(self.__ssh, 'exit_status_ready'):
if self.__ssh.exit_status_ready():
self.__ssh = self.connectSsh()
if self.__ssh:
if hasattr(self.__ssh, 'exit_status_ready'):
if self.__ssh.exit_status_ready():
self.__ssh = self.connectSsh()
self.__ssh.send(info)
try:
time.sleep(0.005)
recv = self.__ssh.recv(8192)
return self.wsSend(recv)
except Exception as ex:
return self.wsSend('')
self.__ssh.send(info)
try:
time.sleep(0.005)
recv = self.__ssh.recv(8192)
return self.wsSend(recv)
except Exception as ex:
return self.wsSend('')
else:
return self.wsSend('连接中...')