From 6035a846752bdedf5466aa4d6c47eb37fe33c58a Mon Sep 17 00:00:00 2001 From: Job Evers-Meltzer Date: Wed, 11 Jan 2017 11:37:44 -0600 Subject: [PATCH] bug fix for stopping downloads deferredlist returns a tuple of (success, result) and the previous code was looking at the entire tuple not the success values. --- lbrynet/core/client/DownloadManager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lbrynet/core/client/DownloadManager.py b/lbrynet/core/client/DownloadManager.py index 78f6a006e..0b1e3adb6 100644 --- a/lbrynet/core/client/DownloadManager.py +++ b/lbrynet/core/client/DownloadManager.py @@ -18,7 +18,6 @@ class DownloadManager(object): self.progress_manager = None self.blob_handler = None self.connection_manager = None - self.blobs = {} self.blob_infos = {} @@ -59,8 +58,8 @@ class DownloadManager(object): d1.addBoth(check_stop, "progress manager") d2 = self.connection_manager.stop() d2.addBoth(check_stop, "connection manager") - dl = defer.DeferredList([d1, d2]) - dl.addCallback(lambda xs: False not in xs) + dl = defer.DeferredList([d1, d2], fireOnOneErrback=True, consumeErrors=True) + dl.addCallback(lambda results: all([success for success, val in results])) return dl def add_blobs_to_download(self, blob_infos):