cancelled error

This commit is contained in:
Jack Robison 2019-04-08 10:58:45 -04:00
parent 7d782d516a
commit 119e0ec408
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1,6 +1,7 @@
import asyncio import asyncio
import typing import typing
import logging import logging
import concurrent.futures
from lbrynet.utils import drain_tasks, cache_concurrent from lbrynet.utils import drain_tasks, cache_concurrent
from lbrynet.blob_exchange.client import request_blob from lbrynet.blob_exchange.client import request_blob
if typing.TYPE_CHECKING: if typing.TYPE_CHECKING:
@ -125,7 +126,7 @@ class BlobDownloader:
blob.close() blob.close()
log.debug("downloaded %s", blob_hash[:8]) log.debug("downloaded %s", blob_hash[:8])
return blob return blob
except asyncio.CancelledError as err: except (concurrent.futures.CancelledError, asyncio.CancelledError) as err:
error = err error = err
finally: finally:
re_add = set() re_add = set()