mirror of https://github.com/python/cpython
Doc: Fix wrong exception used in example. (GH-26572)
This commit is contained in:
parent
58248d9437
commit
15f0fc571c
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue