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
bb26183b
Commit
bb26183b
authored
Jan 28, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monkey: fix patch_ssl to use gevent.ssl
parent
73b5936f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
gevent/monkey.py
gevent/monkey.py
+7
-12
No files found.
gevent/monkey.py
View file @
bb26183b
...
...
@@ -64,21 +64,16 @@ def patch_dns():
_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
():
try
:
ssl
=
__import__
(
'ssl'
)
ssl
.
wrap_socket
=
__wrap_socket
_ssl
=
__import__
(
'ssl'
)
except
ImportError
:
pass
return
from
gevent.ssl
import
SSLSocket
,
wrap_socket
,
get_server_certificate
,
sslwrap_simple
_ssl
.
SSLSocket
=
SSLSocket
_ssl
.
wrap_socket
=
wrap_socket
_ssl
.
get_server_certificate
=
get_server_certificate
_ssl
.
sslwrap_simple
=
sslwrap_simple
def
patch_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