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
d3e7ad56
Commit
d3e7ad56
authored
Jul 01, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exc_info on a successfully finished greenlet shouldn't raise. Fixes #821
parent
7cf9b6a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
src/gevent/greenlet.py
src/gevent/greenlet.py
+9
-3
src/greentest/test__greenlet.py
src/greentest/test__greenlet.py
+8
-0
No files found.
src/gevent/greenlet.py
View file @
d3e7ad56
...
...
@@ -309,10 +309,16 @@ class Greenlet(greenlet):
@
property
def
exc_info
(
self
):
"""Holds the exc_info three-tuple raised by the function if the greenlet finished with an error.
Otherwise a false value."""
"""
Holds the exc_info three-tuple raised by the function if the
greenlet finished with an error. Otherwise a false value.
.. note:: This is a provisional API and may change.
.. versionadded:: 1.1
"""
e
=
self
.
_exc_info
if
e
:
if
e
and
e
[
0
]
is
not
None
:
return
(
e
[
0
],
e
[
1
],
load_traceback
(
e
[
2
]))
def
throw
(
self
,
*
args
):
...
...
src/greentest/test__greenlet.py
View file @
d3e7ad56
...
...
@@ -650,6 +650,14 @@ class TestBasic(greentest.TestCase):
def
test_kill_running_noblock
(
self
):
self
.
_test_kill_running
(
block
=
False
)
def
test_exc_info_no_error
(
self
):
# Before running
self
.
assertFalse
(
greenlet
.
Greenlet
().
exc_info
)
g
=
greenlet
.
Greenlet
(
gevent
.
sleep
)
g
.
start
()
g
.
join
()
self
.
assertFalse
(
g
.
exc_info
)
class
TestStart
(
greentest
.
TestCase
):
...
...
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