diff options
-rw-r--r-- | paramiko/sftp_server.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index 253cffb3..8867badb 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -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): |