diff options
author | Ćukasz Langa <lukasz@langa.pl> | 2017-05-23 07:36:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-23 07:36:23 (GMT) |
commit | 70705e3cdfff6a2c1211456afce99afc3d9ca59b (patch) | |
tree | 7f7c8a53039ea7a5257d18f405bd200f5dfe1a98 /Lib/asyncio | |
parent | 762add7877258b62b38f0cff87159179faa471dc (diff) | |
download | cpython-70705e3cdfff6a2c1211456afce99afc3d9ca59b.zip cpython-70705e3cdfff6a2c1211456afce99afc3d9ca59b.tar.gz cpython-70705e3cdfff6a2c1211456afce99afc3d9ca59b.tar.bz2 |
[3.6] call remove_done_callback in finally section (GH-1688) (#1755)
(cherry picked from commit 21b3e04c13212b29e8c35ffc36eed8603fde08f4)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/base_events.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 0df58c5..a4967b8 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -459,7 +459,8 @@ class BaseEventLoop(events.AbstractEventLoop): # local task. future.exception() raise - future.remove_done_callback(_run_until_complete_cb) + finally: + future.remove_done_callback(_run_until_complete_cb) if not future.done(): raise RuntimeError('Event loop stopped before Future completed.') |