From be86d5474aedcea63af39a271a0f437a79b3d780 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Mon, 26 Jun 2006 23:07:03 -0700 Subject: [PATCH] [project @ robey@lag.net-20060627060703-3d7eadfb1f5042ad] catch and discard exceptions thrown when sending a status response during an exception --- paramiko/sftp_server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index fefb963..91328e2 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -98,7 +98,10 @@ class SFTPServer (BaseSFTP, SubsystemHandler): self._log(DEBUG, 'Exception in server processing: ' + str(e)) self._log(DEBUG, util.tb_strings()) # send some kind of failure message, at least - self._send_status(request_number, SFTP_FAILURE) + try: + self._send_status(request_number, SFTP_FAILURE) + except: + pass def finish_subsystem(self): self.server.session_ended()