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.
This commit is contained in:
Job Evers-Meltzer 2017-01-11 11:37:44 -06:00
parent 1151019186
commit 6035a84675

View file

@ -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):