diff options
author | Robey Pointer <robey@master-shake.local> | 2006-01-20 10:23:50 -0800 |
---|---|---|
committer | Robey Pointer <robey@master-shake.local> | 2006-01-20 10:23:50 -0800 |
commit | f5421e76001bb2a2e4308e70d87801629b67a0db (patch) | |
tree | 931a6efb3d2fedb7e1c4d55d725ce8085d441ffd | |
parent | fa90f1247af35b02d55008e84232d0a89da1adda (diff) |
[project @ robey@master-shake.local-20060120182350-92e8f21d029f8634]
catch a case where the sftp server might give an invalid error code
-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): |