1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 13:23:59 +00:00

Twisted 11.1.0 (precise) can not deal with generators in DeferredList

Also create a list of the crawlers before iterating them because crawlers are removed from the set once stopped
This commit is contained in:
Daniel Graña 2014-09-10 12:04:14 -03:00
parent 99971dc8a8
commit ce180227fa

View File

@ -107,7 +107,7 @@ class CrawlerRunner(object):
crawler.signals.connect(log_observer.stop, signals.engine_stopped)
def stop(self):
return defer.DeferredList(c.stop() for c in self.crawlers)
return defer.DeferredList([c.stop() for c in list(self.crawlers)])
@defer.inlineCallbacks
def join(self):