From 51532af69a551292663fa87279eea0317b4ea3a5 Mon Sep 17 00:00:00 2001 From: Julia Medina Date: Sun, 7 Sep 2014 13:03:34 -0300 Subject: [PATCH] Erase unneeded flag in CrawlerProcess.start --- scrapy/commands/shell.py | 3 +-- scrapy/crawler.py | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scrapy/commands/shell.py b/scrapy/commands/shell.py index e2ef1545e..ff8c0d156 100644 --- a/scrapy/commands/shell.py +++ b/scrapy/commands/shell.py @@ -58,14 +58,13 @@ class Command(ScrapyCommand): crawler.engine = crawler._create_engine() crawler.engine.start() - self.crawler_process.start(start_reactor=False) self._start_crawler_thread() shell = Shell(crawler, update_vars=self.update_vars, code=opts.code) shell.start(url=url) def _start_crawler_thread(self): - t = Thread(target=self.crawler_process._start_reactor, + t = Thread(target=self.crawler_process.start, kwargs={'stop_after_crawl': False}) t.daemon = True t.start() diff --git a/scrapy/crawler.py b/scrapy/crawler.py index 062f2f9fe..00de7d0c0 100644 --- a/scrapy/crawler.py +++ b/scrapy/crawler.py @@ -133,11 +133,7 @@ class CrawlerProcess(CrawlerRunner): self._stop_logging() reactor.callFromThread(self._stop_reactor) - def start(self, stop_after_crawl=True, start_reactor=True): - if start_reactor: - self._start_reactor(stop_after_crawl) - - def _start_reactor(self, stop_after_crawl=True): + def start(self, stop_after_crawl=True): if stop_after_crawl: d = defer.DeferredList(self.crawl_deferreds) if d.called: