summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantinos Koukopoulos <koukopoulos@gmail.com>2014-01-28 00:21:50 -0800
committerKonstantinos Koukopoulos <koukopoulos@gmail.com>2014-01-28 00:21:50 -0800
commitc8b13eae2416e92118b1d1245ece09fc574e2046 (patch)
tree2fbe03e2f7f3fc565b0b2dcd8df90b413ff2e533
parentd3d41b0bc03170c47d66b7b921c51f3779c609ea (diff)
downloadpyopenssl-c8b13eae2416e92118b1d1245ece09fc574e2046.tar.gz
use six's integer_types instead of py3 incompatible type 'long'
-rw-r--r--OpenSSL/SSL.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index 3a0d751..153e1de 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -5,7 +5,7 @@ from weakref import WeakValueDictionary
from errno import errorcode
from six import text_type as _text_type
-
+from six import integer_types as integer_types
from OpenSSL._util import (
ffi as _ffi,
@@ -196,15 +196,15 @@ class _VerifyHelper(object):
def _asFileDescriptor(obj):
fd = None
- if not isinstance(obj, (int, long)):
+ if not isinstance(obj, integer_types):
meth = getattr(obj, "fileno", None)
if meth is not None:
obj = meth()
- if isinstance(obj, (int, long)):
+ if isinstance(obj, integer_types):
fd = obj
- if not isinstance(fd, (int, long)):
+ if not isinstance(fd, integer_types):
raise TypeError("argument must be an int, or have a fileno() method.")
elif fd < 0:
raise ValueError(