Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
a30ef3f4
Commit
a30ef3f4
authored
Apr 11, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use string_types and integer_types
parent
0514c3c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
gevent/socket.py
gevent/socket.py
+2
-2
gevent/ssl.py
gevent/ssl.py
+3
-2
No files found.
gevent/socket.py
View file @
a30ef3f4
...
...
@@ -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
)
...
...
gevent/ssl.py
View file @
a30ef3f4
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment