summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 833f81d..f6d7a58 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -155,7 +155,10 @@ class BaseEventLoop(events.AbstractEventLoop):
"""Schedule a coroutine object.
Return a task object."""
- return tasks.Task(coro, loop=self)
+ task = tasks.Task(coro, loop=self)
+ if task._source_traceback:
+ del task._source_traceback[-1]
+ return task
def _make_socket_transport(self, sock, protocol, waiter=None, *,
extra=None, server=None):