mirror of https://github.com/scrapy/scrapy.git
media: use deferred of request to allow adding callback from get_media_requests
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40249
This commit is contained in:
parent
7932a8a5b6
commit
6f2d36199b
|
|
@ -62,7 +62,7 @@ class MediaPipeline(object):
|
|||
if fp not in info.downloading:
|
||||
self._download(request, info, fp)
|
||||
|
||||
wad = defer.Deferred()
|
||||
wad = request.deferred or defer.Deferred()
|
||||
waiting = info.waiting.setdefault(fp, []).append(wad)
|
||||
return wad
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue