diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-06-01 13:27:43 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-06-01 13:27:43 -0700 |
commit | b99b234e52a18e3dc48cea5dfa38240eb4c17aee (patch) | |
tree | 4d661e31d3ca4d7379a6d0294e17bc56bff5efd2 /paramiko/ssh_exception.py | |
parent | d06e139b5caf524d8f6f942d484ee0667cd99c8f (diff) | |
download | paramiko-b99b234e52a18e3dc48cea5dfa38240eb4c17aee.tar.gz |
Python 2.6 compat formatstrings
Diffstat (limited to 'paramiko/ssh_exception.py')
-rw-r--r-- | paramiko/ssh_exception.py | 7 |
1 files changed, 4 insertions, 3 deletions
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()) |