Commit a30ef3f4 authored by Denis Bilenko's avatar Denis Bilenko

use string_types and integer_types

parent 0514c3c4
......@@ -81,7 +81,7 @@ __imports__ = ['error',
import sys
import time
from gevent.hub import get_hub, basestring
from gevent.hub import get_hub, string_types, integer_types
from gevent.timeout import Timeout
is_windows = sys.platform == 'win32'
......@@ -123,7 +123,7 @@ for name in __imports__[:]:
for name in __socket__.__all__:
value = getattr(__socket__, name)
if isinstance(value, (int, long, basestring)):
if isinstance(value, integer_types) or isinstance(value, string_types):
globals()[name] = value
__imports__.append(name)
......
......@@ -22,7 +22,8 @@ import sys
import errno
from gevent.socket import socket, _fileobject, timeout_default
from gevent.socket import error as socket_error, EBADF
from gevent.hub import basestring
from gevent.hub import string_types
__implements__ = ['SSLSocket',
'wrap_socket',
......@@ -48,7 +49,7 @@ for name in __imports__[:]:
for name in dir(__ssl__):
if not name.startswith('_'):
value = getattr(__ssl__, name)
if isinstance(value, (int, long, basestring, tuple)):
if isinstance(value, (int, long, tuple)) or isinstance(value, string_types):
globals()[name] = value
__imports__.append(name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment