diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2019-12-03 16:38:36 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2019-12-03 16:38:36 -0500 |
commit | 109b14c6510d85df935a546a5fe32f1f069cc2b2 (patch) | |
tree | de76ec05a8cb5170ad12ae75acfa346eeeb5a46c /paramiko/pkey.py | |
parent | 0e337055cbd65de8f411e1d07f19a40b19cd44f7 (diff) | |
download | paramiko-109b14c6510d85df935a546a5fe32f1f069cc2b2.tar.gz |
Remove a few spots of old style string formatting
Diffstat (limited to 'paramiko/pkey.py')
-rw-r--r-- | paramiko/pkey.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 312d0540..0dbe97fc 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -309,7 +309,7 @@ class PKey(object): start += 1 keytype = m.group(1) if m else None if start >= len(lines) or keytype is None: - raise SSHException("not a valid " + tag + " private key file") + raise SSHException("not a valid {} private key file".format(tag)) # find the END tag end = start @@ -352,7 +352,7 @@ class PKey(object): try: data = decodebytes(b("".join(lines[start:end]))) except base64.binascii.Error as e: - raise SSHException("base64 decoding error: " + str(e)) + raise SSHException("base64 decoding error: {}".format(e)) if "proc-type" not in headers: # unencryped: done return data @@ -394,7 +394,7 @@ class PKey(object): try: data = decodebytes(b("".join(lines))) except base64.binascii.Error as e: - raise SSHException("base64 decoding error: " + str(e)) + raise SSHException("base64 decoding error: {}".format(e)) # read data struct auth_magic = data[:14] |