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
454028b8
Commit
454028b8
authored
Jun 04, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monkey: make patch_socket() delete 'ssl' from socket module if not provided by gevent
- if 'agressive' argument is true (default)
parent
531e89b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
gevent/monkey.py
gevent/monkey.py
+7
-3
No files found.
gevent/monkey.py
View file @
454028b8
...
...
@@ -58,7 +58,7 @@ def patch_thread(threading=True, _threading_local=True):
_threading_local
.
local
=
local
def
patch_socket
(
dns
=
True
):
def
patch_socket
(
dns
=
True
,
aggressive
=
True
):
from
gevent.socket
import
socket
,
fromfd
,
socketpair
,
SocketType
_socket
=
__import__
(
'socket'
)
_socket
.
socket
=
socket
...
...
@@ -70,7 +70,11 @@ def patch_socket(dns=True):
_socket
.
ssl
=
ssl
_socket
.
sslerror
=
sslerror
except
ImportError
:
pass
if
aggressive
:
try
:
del
_socket
.
ssl
except
AttributeError
:
pass
if
dns
:
patch_dns
()
...
...
@@ -118,7 +122,7 @@ def patch_all(socket=True, dns=True, time=True, select=True, thread=True, os=Tru
if
thread
:
patch_thread
()
if
socket
:
patch_socket
(
dns
=
dns
)
patch_socket
(
dns
=
dns
,
aggressive
=
aggressive
)
if
select
:
patch_select
(
aggressive
=
aggressive
)
if
ssl
:
...
...
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