Skip to content

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

Fix stray “commands” (#5712)

Laerte Pereiraae3fd0172972
diff --git a/scrapy/cmdline.py b/scrapy/cmdline.py
index 5ee1f0f44..68267fb74 100644
--- a/scrapy/cmdline.py
+++ b/scrapy/cmdline.py
@@ -7,7 +7,7 @@ import pkg_resources
import scrapy
from scrapy.crawler import CrawlerProcess
-from scrapy.commands import ScrapyCommand, ScrapyHelpFormatter
+from scrapy.commands import ScrapyCommand, ScrapyHelpFormatter, BaseRunSpiderCommand
from scrapy.exceptions import UsageError
from scrapy.utils.misc import walk_modules
from scrapy.utils.project import inside_project, get_project_settings
@@ -32,7 +32,7 @@ def _iter_command_classes(module_name):
inspect.isclass(obj)
and issubclass(obj, ScrapyCommand)
and obj.__module__ == module.__name__
- and not obj == ScrapyCommand
+ and obj not in (ScrapyCommand, BaseRunSpiderCommand)
):
yield obj