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
9c8ec172
Commit
9c8ec172
authored
Feb 10, 2014
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #358 from fantix/exc_clear
Ignore sys.exc_clear() for PY3.
parents
2960692c
7483cef1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
gevent/backdoor.py
gevent/backdoor.py
+3
-1
gevent/os.py
gevent/os.py
+5
-3
gevent/pywsgi.py
gevent/pywsgi.py
+3
-1
greentest/test__exc_info.py
greentest/test__exc_info.py
+3
-1
No files found.
gevent/backdoor.py
View file @
9c8ec172
...
...
@@ -30,6 +30,7 @@ from code import InteractiveConsole
from
gevent
import
socket
from
gevent.greenlet
import
Greenlet
from
gevent.hub
import
PY3
from
gevent.server
import
StreamServer
__all__
=
[
'BackdoorServer'
]
...
...
@@ -79,6 +80,7 @@ class SocketConsole(Greenlet):
console
.
locals
[
"builtins"
]
=
builtins
console
.
interact
(
banner
=
self
.
banner
)
except
SystemExit
:
# raised by quit()
if
not
PY3
:
sys
.
exc_clear
()
finally
:
self
.
switch_out
()
...
...
gevent/os.py
View file @
9c8ec172
...
...
@@ -8,7 +8,7 @@ from __future__ import absolute_import
import
os
import
sys
from
gevent.hub
import
get_hub
,
reinit
from
gevent.hub
import
get_hub
,
reinit
,
PY3
import
errno
EAGAIN
=
getattr
(
errno
,
'EAGAIN'
,
11
)
...
...
@@ -52,6 +52,7 @@ if fcntl:
except
OSError
as
e
:
if
e
.
errno
not
in
ignored_errors
:
raise
if
not
PY3
:
sys
.
exc_clear
()
if
hub
is
None
:
hub
=
get_hub
()
...
...
@@ -71,6 +72,7 @@ if fcntl:
except
OSError
as
e
:
if
e
.
errno
not
in
ignored_errors
:
raise
if
not
PY3
:
sys
.
exc_clear
()
if
hub
is
None
:
hub
=
get_hub
()
...
...
gevent/pywsgi.py
View file @
9c8ec172
...
...
@@ -13,6 +13,7 @@ from gevent import socket
import
gevent
from
gevent.server
import
StreamServer
from
gevent.hub
import
GreenletExit
from
gevent.hub
import
PY3
__all__
=
[
'WSGIHandler'
,
'WSGIServer'
]
...
...
@@ -321,6 +322,7 @@ class WSGIHandler(object):
except
socket
.
error
as
ex
:
# Broken pipe, connection reset by peer
if
ex
.
args
[
0
]
in
(
errno
.
EPIPE
,
errno
.
ECONNRESET
):
if
not
PY3
:
sys
.
exc_clear
()
return
else
:
...
...
greentest/test__exc_info.py
View file @
9c8ec172
import
gevent
import
sys
import
greentest
import
six
sys
.
exc_clear
()
if
not
six
.
PY3
:
sys
.
exc_clear
()
class
ExpectedError
(
Exception
):
...
...
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