diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-20 13:30:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-20 13:30:31 (GMT) |
commit | 6655354afcd116c27486bb5ba1dfa50b369d8d85 (patch) | |
tree | a4c2dafd327bc7b1033695108b5bc86c5383145c /Lib/asyncio/tasks.py | |
parent | 4151061855b571bf8a7579daa7875b8e243057b9 (diff) | |
download | cpython-6655354afcd116c27486bb5ba1dfa50b369d8d85.zip cpython-6655354afcd116c27486bb5ba1dfa50b369d8d85.tar.gz cpython-6655354afcd116c27486bb5ba1dfa50b369d8d85.tar.bz2 |
bpo-33584: Fix several minor bugs in asyncio. (GH-7003)
Fix the following bugs in the C implementation:
* get_future_loop() silenced all exceptions raised when look up the get_loop
attribute, not just an AttributeError.
* enter_task() silenced all exceptions raised when look up the current task,
not just a KeyError.
* repr() was called for a borrowed link in enter_task() and task_step_impl().
* str() was used instead of repr() in formatting one error message (in
Python implementation too).
* There where few reference leaks in error cases.
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r-- | Lib/asyncio/tasks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 3590748..5df1af6 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -261,7 +261,7 @@ class Task(futures._PyFuture): # Inherit Python Task implementation # Yielding a generator is just wrong. new_exc = RuntimeError( f'yield was used instead of yield from for ' - f'generator in task {self!r} with {result}') + f'generator in task {self!r} with {result!r}') self._loop.call_soon( self.__step, new_exc, context=self._context) else: |