Parcourir la source

Switch from concurrent.futures.CancelledError to asyncio.CancelledError

Since Python 3.8, the latter does not inherit from the former anymore.
master
JustAnotherArchivist il y a 3 ans
Parent
révision
c878241f24
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      qwarc/__init__.py

+ 1
- 1
qwarc/__init__.py Voir le fichier

@@ -250,7 +250,7 @@ class QWARC:
item = future.item item = future.item
try: try:
future.result() 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 # Got cancelled, nothing we can do about it, but let's log a warning if it's a process task
if future.taskType == 'process': if future.taskType == 'process':
logging.error(f'Task for {future.itemType}:{future.itemValue} cancelled: {future!r}') logging.error(f'Task for {future.itemType}:{future.itemValue} cancelled: {future!r}')


Chargement…
Annuler
Enregistrer