catch a case where the sftp server might give an invalid error code
This commit is contained in:
Robey Pointer 2006-01-20 10:23:50 -08:00
parent fa90f1247a
commit f5421e7600
1 changed files with 4 additions and 1 deletions

View File

@ -184,7 +184,10 @@ class SFTPServer (BaseSFTP, SubsystemHandler):
def _send_status(self, request_number, code, desc=None):
if desc is None:
desc = SFTP_DESC[code]
try:
desc = SFTP_DESC[code]
except IndexError:
desc = 'Unknown'
self._response(request_number, CMD_STATUS, code, desc)
def _open_folder(self, request_number, path):