diff options
author | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2014-05-01 09:31:19 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2014-05-01 09:31:19 -0400 |
commit | f22abcd359fd3c5e5280d38570b9c33a338384ac (patch) | |
tree | 0a32b51dab4456b76bfad32c70e5125e6929bd48 | |
parent | 40da72daab527ed11684ee0749c292c3b7a3fdcd (diff) | |
download | pyopenssl-f22abcd359fd3c5e5280d38570b9c33a338384ac.tar.gz |
Apparently that code is a no-go on Python 2. It seemed to work on Python 3 though.
-rw-r--r-- | OpenSSL/crypto.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py index d62ce84..c48c84f 100644 --- a/OpenSSL/crypto.py +++ b/OpenSSL/crypto.py @@ -5,7 +5,8 @@ from operator import __eq__, __ne__, __lt__, __le__, __gt__, __ge__ from six import ( integer_types as _integer_types, - text_type as _text_type) + text_type as _text_type, + PY3 as _PY3) from OpenSSL._util import ( ffi as _ffi, @@ -274,10 +275,11 @@ class _EllipticCurve(object): """ _curves = None - def __ne__(self, other): - if isinstance(other, _EllipticCurve): - return super(_EllipticCurve, self).__ne__(other) - return NotImplemented + if _PY3: + def __ne__(self, other): + if isinstance(other, _EllipticCurve): + return super(_EllipticCurve, self).__ne__(other) + return NotImplemented @classmethod |