diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2019-12-03 15:51:36 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2019-12-03 15:51:36 -0500 |
commit | b133afaecffe5e2cc3bbc78d8a7e2cdcf40f0191 (patch) | |
tree | 06151039f36812916c33625dc116f83cf648463f /paramiko/pkey.py | |
parent | c67cf36c6596879b7e161d5c99db8c4e1c2a9c44 (diff) | |
download | paramiko-b133afaecffe5e2cc3bbc78d8a7e2cdcf40f0191.tar.gz |
Modify exception raised by weird key subclasses w/ bad pkformat
Not sure this can even really happen though
Diffstat (limited to 'paramiko/pkey.py')
-rw-r--r-- | paramiko/pkey.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 32b696b2..b9e6c613 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -333,6 +333,10 @@ class PKey(object): return pkformat, data + def _got_bad_key_format_id(self, id_): + err = "{}._read_private_key() spat out an unknown key format id '{}'" + raise SSHException(err.format(self.__class__.__name__, id_)) + def _read_private_key_old_format(self, lines, end, password): start = 0 # parse any headers first |