]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Doc: Fix wrong exception used in example. (GH-26572)
authorJulien Palard <julien@palard.fr>
Thu, 8 Jul 2021 07:31:28 +0000 (09:31 +0200)
committerGitHub <noreply@github.com>
Thu, 8 Jul 2021 07:31:28 +0000 (09:31 +0200)
Doc/library/asyncio-task.rst

index 44ec3cc8826c0226f4f174c96b474070ee7629d0..107578fc72203534fbb943fb088c09581d53895b 100644 (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: