Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Erase unneeded flag in CrawlerProcess.start

Julia Medina51532af69a55
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: