Scrapy, a fast high-level web crawling & scraping framework for Python.
fixed bug in help command (thanks slav0nic for reporting)
Pablo Hoffman625137464f61
diff --git a/scrapy/command/commands/help.py b/scrapy/command/commands/help.pyindex 5cecbc75d..915a22041 100644--- a/scrapy/command/commands/help.py+++ b/scrapy/command/commands/help.py@@ -1,3 +1,5 @@+import textwrap+from scrapy.command import ScrapyCommand, cmdlineclass Command(ScrapyCommand):@@ -14,16 +16,25 @@ class Command(ScrapyCommand):if not args:return False- commands = cmdline.builtin_commands_dict()- commands.update(cmdline.custom_commands_dict())+ commands = cmdline.get_commands_dict()cmdname = args[0]if cmdname in commands:cmd = commands[cmdname]help = getattr(cmd, 'help', None) or getattr(cmd, 'long_desc', None)- print "%s: %s" % (cmdname, cmd.short_desc())+ title = "%s command" % cmdname+ print title+ print "-" * len(title)+ print cmd.short_desc()print "usage: %s %s" % (cmdname, cmd.syntax())- print help()+ print "\n".join(textwrap.wrap(help()))+ print "For a list of supported arguments use:"+ print " scrapy-ctl.py %s -h" % cmdnameelse:print "Unknown command: %s" % cmdname