Doc: Fix wrong exception used in example. (GH-26572)

This commit is contained in:
Julien Palard 2021-07-08 09:31:28 +02:00 committed by GitHub
parent 58248d9437
commit 15f0fc571c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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: