[Python-checkins] Doc: Fix wrong exception used in example. (GH-26572)
miss-islington
webhook-mailer at python.org
Fri Jul 9 00:51:52 EDT 2021
https://github.com/python/cpython/commit/662ace109352174fbe2356d9dca0ce9c4330d7db
commit: 662ace109352174fbe2356d9dca0ce9c4330d7db
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-07-08T21:51:26-07:00
summary:
Doc: Fix wrong exception used in example. (GH-26572)
(cherry picked from commit 15f0fc571c1fbc84b6b74dfeb373ca3d35e4c5d7)
Co-authored-by: Julien Palard <julien at palard.fr>
files:
M Doc/library/asyncio-task.rst
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index bbdef3345a4d4..fb86892547b5f 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:
More information about the Python-checkins
mailing list