Scrapy, a fast high-level web crawling & scraping framework for Python.
scrapyd: use runner from config (if not specified) on get_spider_list()
Pablo Hoffman3d8b368fc642
diff --git a/scrapyd/utils.py b/scrapyd/utils.pyindex 6a670377c..c100d9833 100644--- a/scrapyd/utils.py+++ b/scrapyd/utils.py@@ -5,6 +5,7 @@ from ConfigParser import NoSectionErrorfrom scrapy.spiderqueue import SqliteSpiderQueuefrom scrapy.utils.python import stringify_dict, unicode_to_str+from scrapyd.config import Configdef get_spider_queues(config):"""Return a dict of Spider Quees keyed by project name"""@@ -44,8 +45,10 @@ def get_crawl_args(message):args += ['%s=%s' % (k, v)]return args-def get_spider_list(project, runner='scrapyd.runner'):+def get_spider_list(project, runner=None):"""Return the spider list from the given project, using the given runner"""+ if runner is None:+ runner = Config().get('runner')env = os.environ.copy()env['SCRAPY_PROJECT'] = projectpargs = [sys.executable, '-m', runner, 'list']