diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-10-10 18:24:34 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-10-10 18:24:38 -0700 |
commit | 29ac57f565ac94021dee46b365daa56a3d27333e (patch) | |
tree | dda22abe6f5eba8118b225c55fac2f7a09237e4e /paramiko/pkey.py | |
parent | 9019b25497c2b143e06da6a393e24b67bfc848f0 (diff) | |
download | paramiko-1070-remove-python26-and-33.tar.gz |
String format modernization, part 11070-remove-python26-and-33
Choosing to skip it in some edge/corner cases where it's more harmful
than helpful. Also choosing to replace many non-%s specifiers with
regular old {} since I don't see why one would normally care. Again,
eschewing that in spots where it seems like it might matter.
Diffstat (limited to 'paramiko/pkey.py')
-rw-r--r-- | paramiko/pkey.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 533d0797..ae01dca2 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -312,14 +312,14 @@ class PKey(object): # encrypted keyfile: will need a password if headers['proc-type'] != '4,ENCRYPTED': raise SSHException( - 'Unknown private key structure "%s"' % headers['proc-type']) + 'Unknown private key structure "{}"'.format(headers['proc-type'])) try: encryption_type, saltstr = headers['dek-info'].split(',') except: raise SSHException("Can't parse DEK-info in private key file") if encryption_type not in self._CIPHER_TABLE: raise SSHException( - 'Unknown private key cipher "%s"' % encryption_type) + 'Unknown private key cipher "{}"'.format(encryption_type)) # if no password was passed in, # raise an exception pointing out that we need one if password is None: |