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
7507e866
Commit
7507e866
authored
Jan 11, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monkey: do not break ssl's wrap_socket with socket.ssl
parent
8d777efd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
gevent/monkey.py
gevent/monkey.py
+16
-4
No files found.
gevent/monkey.py
View file @
7507e866
...
...
@@ -55,11 +55,23 @@ def patch_dns():
_socket
.
getaddrinfo
=
getaddrinfo
_socket
.
gethostbyname
=
gethostbyname
def
__wrap_socket
(
sock
,
keyfile
=
None
,
certfile
=
None
,
**
kwargs
):
if
kwargs
:
ssl
=
__import__
(
'ssl'
)
# XXX since there is no gevent.ssl yet, cowardly call the blocking function
return
ssl
.
wrap_socket
(
sock
,
keyfile
=
keyfile
,
certfile
=
certfile
,
**
kwargs
)
from
gevent.socket
import
ssl
return
ssl
(
sock
,
keyfile
=
keyfile
,
certfile
=
certfile
)
def
patch_ssl
():
if
sys
.
version_info
[:
2
]
>=
(
2
,
6
):
from
gevent.socket
import
wrap_ssl
import
ssl
ssl
.
wrap_socket
=
wrap_ssl
try
:
ssl
=
__import__
(
'ssl'
)
ssl
.
wrap_socket
=
__wrap_socket
except
ImportError
:
pass
def
patch_select
():
from
gevent.select
import
select
...
...
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