From c878241f24a3ffcdc99d573f9cc87dd5cc9f3e34 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sat, 11 Jul 2020 02:59:16 +0000 Subject: [PATCH] Switch from concurrent.futures.CancelledError to asyncio.CancelledError Since Python 3.8, the latter does not inherit from the former anymore. --- qwarc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qwarc/__init__.py b/qwarc/__init__.py index c998f98..c3e3320 100644 --- a/qwarc/__init__.py +++ b/qwarc/__init__.py @@ -250,7 +250,7 @@ class QWARC: item = future.item try: future.result() - except concurrent.futures.CancelledError as e: + except asyncio.CancelledError as e: # Got cancelled, nothing we can do about it, but let's log a warning if it's a process task if future.taskType == 'process': logging.error(f'Task for {future.itemType}:{future.itemValue} cancelled: {future!r}')