summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-07-08 21:51:26 -0700
committerGitHub <noreply@github.com>2021-07-08 21:51:26 -0700
commit662ace109352174fbe2356d9dca0ce9c4330d7db (patch)
treed527e73a8bd50ad10d530970c066671e55b23712
parent9f2c63b258846a95393b556fee5e1090173ea717 (diff)
downloadcpython-git-662ace109352174fbe2356d9dca0ce9c4330d7db.tar.gz
Doc: Fix wrong exception used in example. (GH-26572)
(cherry picked from commit 15f0fc571c1fbc84b6b74dfeb373ca3d35e4c5d7) Co-authored-by: Julien Palard <julien@palard.fr>
-rw-r--r--Doc/library/asyncio-task.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index bbdef3345a..fb86892547 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -766,7 +766,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: