diff options
author | Christopher Papke <chris.papke@imperva.com> | 2022-04-05 14:54:42 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2022-04-25 08:07:40 -0400 |
commit | f8036d69ff425b81b7070ce91e31252c72bfe632 (patch) | |
tree | 34bba6bc8f7e3e2910786a628567ad663362e66f /paramiko/pkey.py | |
parent | 094a5e10982c7d7ef9f17fdf755d755fec9fe19b (diff) | |
download | paramiko-f8036d69ff425b81b7070ce91e31252c72bfe632.tar.gz |
don't throw exception when comparing PKey to non-PKey
Diffstat (limited to 'paramiko/pkey.py')
-rw-r--r-- | paramiko/pkey.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 7865a6ea..f494c80e 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -140,7 +140,7 @@ class PKey(object): return cmp(self.asbytes(), other.asbytes()) # noqa def __eq__(self, other): - return self._fields == other._fields + return isinstance(other, PKey) and self._fields == other._fields def __hash__(self): return hash(self._fields) |