commit | 21b3e04c13212b29e8c35ffc36eed8603fde08f4 | [log] [tgz] |
---|---|---|
author | jimmylai <albert_chs@yahoo.com.tw> | Mon May 22 22:32:46 2017 -0700 |
committer | Ćukasz Langa <lukasz@langa.pl> | Mon May 22 22:32:46 2017 -0700 |
tree | 312a2f63480b10ebbd79ceec8203df27e68a688c | |
parent | 002665a9da3a2924c4a08511ede62ff4d1dabc48 [diff] [blame] |
call remove_done_callback in finally section (#1688)
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 3ff511b..33b8f48 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py
@@ -458,7 +458,8 @@ # 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.')