aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-06-29 21:46:42 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-06-29 23:46:42 -0500
commit336d80238465cb3426e2705091709a6292457043 (patch)
tree5d2b1e1c2b586156ce3e2101cc0dd4951f1e0e2e /src
parentaa32e71de55f5f00666bacac5d8d691f17e60d34 (diff)
downloadpyopenssl-336d80238465cb3426e2705091709a6292457043.tar.gz
Kill dead code (#647)
* Simplify code * dead code * unused... * write imports normally
Diffstat (limited to 'src')
-rw-r--r--src/OpenSSL/SSL.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index b571a5e..b17d25b 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -8,9 +8,9 @@ from errno import errorcode
from cryptography.utils import deprecated
-from six import binary_type as _binary_type
-from six import integer_types as integer_types
-from six import int2byte, indexbytes
+from six import (
+ binary_type as _binary_type, integer_types as integer_types, int2byte,
+ indexbytes)
from OpenSSL._util import (
UNSPECIFIED as _UNSPECIFIED,
@@ -59,9 +59,8 @@ TLSv1_2_METHOD = 6
OP_NO_SSLv2 = _lib.SSL_OP_NO_SSLv2
OP_NO_SSLv3 = _lib.SSL_OP_NO_SSLv3
OP_NO_TLSv1 = _lib.SSL_OP_NO_TLSv1
-
-OP_NO_TLSv1_1 = getattr(_lib, "SSL_OP_NO_TLSv1_1", 0)
-OP_NO_TLSv1_2 = getattr(_lib, "SSL_OP_NO_TLSv1_2", 0)
+OP_NO_TLSv1_1 = _lib.SSL_OP_NO_TLSv1_1
+OP_NO_TLSv1_2 = _lib.SSL_OP_NO_TLSv1_2
MODE_RELEASE_BUFFERS = _lib.SSL_MODE_RELEASE_BUFFERS