@@ -1170,7 +1170,7 @@ def x11_status_checker(self, session, session_fileno):
11701170
11711171 def exec_command (
11721172 self , command , bufsize = - 1 , timeout = 30 , get_pty = False , retries = 3 , x11 = False
1173- ) -> Union [tuple [paramiko .Channel , paramiko .Channel , paramiko .Channel ], tuple [bool , bool , bool ]]:
1173+ ) -> Union [tuple [paramiko .ChannelFile , paramiko .ChannelFile , paramiko .ChannelFile ], tuple [bool , bool , bool ]]:
11741174 """Execute a command on the SSH server.
11751175
11761176 A new ``.Channel`` is open and the requested command is executed.
@@ -1213,7 +1213,7 @@ def exec_command(
12131213 stdout = chan .makefile ('rb' , bufsize )
12141214 stderr = chan .makefile_stderr ('rb' , bufsize )
12151215 return stdin , stdout , stderr
1216- except (paramiko .SSHException , ConnectionError , socket .error ) as e :
1216+ except (paramiko .SSHException , ConnectionError , socket .error , IOError ) as e :
12171217 Log .warning (f'A networking error occurred while executing command [{ command } ]: { str (e )} ' )
12181218 if not self .connected or not self .transport or not self .transport .active :
12191219 self .restore_connection (None )
0 commit comments