From: Julien Palard Date: Thu, 8 Jul 2021 07:31:28 +0000 (+0200) Subject: Doc: Fix wrong exception used in example. (GH-26572) X-Git-Tag: v3.11.0a1~713 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15f0fc571c1fbc84b6b74dfeb373ca3d35e4c5d7;p=thirdparty%2FPython%2Fcpython.git Doc: Fix wrong exception used in example. (GH-26572) --- diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 44ec3cc8826c..107578fc7220 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -763,7 +763,7 @@ Scheduling From Other Threads try: result = future.result(timeout) - except asyncio.TimeoutError: + except concurrent.futures.TimeoutError: print('The coroutine took too long, cancelling the task...') future.cancel() except Exception as exc: