diff options
-rw-r--r-- | paramiko/server.py | 6 | ||||
-rw-r--r-- | paramiko/sftp_server.py | 2 | ||||
-rw-r--r-- | paramiko/ssh_exception.py | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/paramiko/server.py b/paramiko/server.py index 953bb33f..b2a07916 100644 --- a/paramiko/server.py +++ b/paramiko/server.py @@ -660,8 +660,10 @@ class SubsystemHandler (threading.Thread): except Exception as e: self.__transport._log( ERROR, - 'Exception in subsystem handler for "{}": {}'.format( - self.__name, e)) + 'Exception in subsystem handler for "{0}": {1}'.format( + self.__name, e + ) + ) self.__transport._log(ERROR, util.tb_strings()) try: self.finish_subsystem() diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index d7b46e41..f94c5e39 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -200,7 +200,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler): item._pack(msg) else: raise Exception( - 'unknown type for {!r} type {!r}'.format( + 'unknown type for {0!r} type {1!r}'.format( item, type(item))) self._send_packet(t, msg) diff --git a/paramiko/ssh_exception.py b/paramiko/ssh_exception.py index e3584d89..746fd213 100644 --- a/paramiko/ssh_exception.py +++ b/paramiko/ssh_exception.py @@ -65,8 +65,9 @@ class BadAuthenticationType (AuthenticationException): self.args = (explanation, types, ) def __str__(self): - return '{} (allowed_types={!r})'.format( - SSHException.__str__(self), self.allowed_types) + return '{0} (allowed_types={1!r})'.format( + SSHException.__str__(self), self.allowed_types + ) class PartialAuthentication (AuthenticationException): @@ -108,7 +109,7 @@ class BadHostKeyException (SSHException): .. versionadded:: 1.6 """ def __init__(self, hostname, got_key, expected_key): - message = 'Host key for server {} does not match: got {} expected {}' + message = 'Host key for server {0} does not match: got {0}, expected {0}' # noqa message = message.format( hostname, got_key.get_base64(), expected_key.get_base64()) |