use DownloadTimeoutError instead of generic Exception
This commit is contained in:
parent
be75c1bc5b
commit
8398d57024
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ from twisted.internet.task import LoopingCall
|
||||||
|
|
||||||
from lbryschema.fee import Fee
|
from lbryschema.fee import Fee
|
||||||
|
|
||||||
from lbrynet.core.Error import InsufficientFundsError, KeyFeeAboveMaxAllowed
|
from lbrynet.core.Error import InsufficientFundsError, KeyFeeAboveMaxAllowed, DownloadTimeoutError
|
||||||
from lbrynet.core.StreamDescriptor import download_sd_blob
|
from lbrynet.core.StreamDescriptor import download_sd_blob
|
||||||
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory
|
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory
|
||||||
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloader
|
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloader
|
||||||
|
@ -88,7 +88,7 @@ class GetStream(object):
|
||||||
self.timeout_counter += 1
|
self.timeout_counter += 1
|
||||||
if self.timeout_counter >= self.timeout:
|
if self.timeout_counter >= self.timeout:
|
||||||
if not self.data_downloading_deferred.called:
|
if not self.data_downloading_deferred.called:
|
||||||
self.data_downloading_deferred.errback(Exception("Timeout"))
|
self.data_downloading_deferred.errback(DownloadTimeoutError(self.file_name))
|
||||||
safe_stop(self.checker)
|
safe_stop(self.checker)
|
||||||
else:
|
else:
|
||||||
d = self.downloader.status()
|
d = self.downloader.status()
|
||||||
|
|
Loading…
Add table
Reference in a new issue