Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7ce010cb
Commit
7ce010cb
authored
Apr 27, 2014
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio: Be careful accessing instance variables in __del__ (closes #21340).
parent
7bf75c9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Lib/asyncio/tasks.py
Lib/asyncio/tasks.py
+3
-1
No files found.
Lib/asyncio/tasks.py
View file @
7ce010cb
...
...
@@ -76,7 +76,9 @@ class CoroWrapper:
return
self
.
gen
.
gi_code
def
__del__
(
self
):
frame
=
self
.
gen
.
gi_frame
# Be careful accessing self.gen.frame -- self.gen might not exist.
gen
=
getattr
(
self
,
'gen'
,
None
)
frame
=
getattr
(
gen
,
'gi_frame'
,
None
)
if
frame
is
not
None
and
frame
.
f_lasti
==
-
1
:
func
=
self
.
func
code
=
func
.
__code__
...
...
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