mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Doc: Fix wrong exception used in example. (GH-26572)
(cherry picked from commit 15f0fc571c
)
Co-authored-by: Julien Palard <julien@palard.fr>
This commit is contained in:
parent
9f2c63b258
commit
662ace1093
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue