Skip to content

Commit 15f0fc5

Browse files
authored
Doc: Fix wrong exception used in example. (GH-26572)
1 parent 58248d9 commit 15f0fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/asyncio-task.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ Scheduling From Other Threads
763763

764764
try:
765765
result = future.result(timeout)
766-
except asyncio.TimeoutError:
766+
except concurrent.futures.TimeoutError:
767767
print('The coroutine took too long, cancelling the task...')
768768
future.cancel()
769769
except Exception as exc:

0 commit comments

Comments
 (0)