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:
Miss Islington (bot) 2021-07-08 21:51:26 -07:00 committed by GitHub
parent 9f2c63b258
commit 662ace1093
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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