From 26f1a920acea2da4ca23cf19cb3635be86c650c9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 18 Nov 2019 00:37:39 -0500 Subject: Make the code slightly resillient to python4 (#880) --- src/OpenSSL/crypto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/OpenSSL/crypto.py') diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 5a734cc..b51e12f 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -7,7 +7,7 @@ from operator import __eq__, __ne__, __lt__, __le__, __gt__, __ge__ from six import ( integer_types as _integer_types, text_type as _text_type, - PY3 as _PY3) + PY2 as _PY2) from cryptography import x509 from cryptography.hazmat.primitives.asymmetric import dsa, rsa @@ -377,7 +377,7 @@ class _EllipticCurve(object): """ _curves = None - if _PY3: + if not _PY2: # This only necessary on Python 3. Morever, it is broken on Python 2. def __ne__(self, other): """ -- cgit v1.2.1