From a24516ed19f0fc3fa103b73a58de16f7fe1d64ec Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Wed, 15 Jul 2009 21:18:58 -0300 Subject: [PATCH] updated list command to show only spider domain names --- scrapy/command/commands/list.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scrapy/command/commands/list.py b/scrapy/command/commands/list.py index 70f6f43c4..eba9e7e96 100644 --- a/scrapy/command/commands/list.py +++ b/scrapy/command/commands/list.py @@ -6,11 +6,7 @@ class Command(ScrapyCommand): return "" def short_desc(self): - return "List available spiders (both enabled and disabled)" + return "List available spiders" def run(self, args, opts): - spiders_dict = spiders.asdict() - for n, p in spiders_dict.items(): - disabled = "disabled" if getattr(p, 'disabled', False) else "enabled" - print "%-30s %-30s %s" % (n, p.__class__.__name__, disabled) - print "Total spiders: %d" % len(spiders_dict) + print "\n".join(spiders.asdict().keys())