diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-10-10 14:41:59 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-10-10 14:41:59 -0700 |
commit | eea4f62f0fb5a14eece79565145fb5589008c7e1 (patch) | |
tree | ed4c2f0f166e424004e9dd52a2251f57e4890b54 /paramiko/ssh_exception.py | |
parent | 2f4766f7ef6442004fc9de72504de45bb577847b (diff) | |
download | paramiko-eea4f62f0fb5a14eece79565145fb5589008c7e1.tar.gz |
Use new(er)-style string formatting, {} instead of {0}
Diffstat (limited to 'paramiko/ssh_exception.py')
-rw-r--r-- | paramiko/ssh_exception.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/ssh_exception.py b/paramiko/ssh_exception.py index e9ab8d66..f8405a31 100644 --- a/paramiko/ssh_exception.py +++ b/paramiko/ssh_exception.py @@ -63,7 +63,7 @@ class BadAuthenticationType (AuthenticationException): self.args = (explanation, types, ) def __str__(self): - return '{0} (allowed_types={1!r})'.format( + return '{} (allowed_types={!r})'.format( SSHException.__str__(self), self.allowed_types ) @@ -107,7 +107,7 @@ class BadHostKeyException (SSHException): .. versionadded:: 1.6 """ def __init__(self, hostname, got_key, expected_key): - message = 'Host key for server {0} does not match: got {1}, expected {2}' # noqa + message = 'Host key for server {} does not match: got {}, expected {}' # noqa message = message.format( hostname, got_key.get_base64(), expected_key.get_base64()) |