diff options
-rw-r--r-- | paramiko/dsskey.py | 2 | ||||
-rw-r--r-- | paramiko/rsakey.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py index c067de06..ebff2b40 100644 --- a/paramiko/dsskey.py +++ b/paramiko/dsskey.py @@ -117,7 +117,7 @@ class DSSKey (PKey): keylist = BER(data).decode() except BERException: raise SSHException('Unable to parse key file') - if (type(keylist) != type([])) or (len(keylist) < 6) or (keylist[0] != 0): + if (type(keylist) is not list) or (len(keylist) < 6) or (keylist[0] != 0): raise SSHException('not a valid DSA private key file (bad ber encoding)') self.p = keylist[1] self.q = keylist[2] diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index 092a5610..dad8bc73 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -104,7 +104,7 @@ class RSAKey (PKey): keylist = BER(data).decode() except BERException: raise SSHException('Unable to parse key file') - if (type(keylist) != type([])) or (len(keylist) < 4) or (keylist[0] != 0): + if (type(keylist) is not list) or (len(keylist) < 4) or (keylist[0] != 0): raise SSHException('Not a valid RSA private key file (bad ber encoding)') self.n = keylist[1] self.e = keylist[2] |