Scrapy, a fast high-level web crawling & scraping framework for Python.
- avoid to raise an exception when no arg is given to replay command
olveyra9164150bed4b
diff --git a/scrapy/trunk/scrapy/command/commands/replay.py b/scrapy/trunk/scrapy/command/commands/replay.pyindex a0be811b5..4c0a3fd79 100644--- a/scrapy/trunk/scrapy/command/commands/replay.py+++ b/scrapy/trunk/scrapy/command/commands/replay.py@@ -36,14 +36,15 @@ class Command(ScrapyCommand):parser.add_option("--pages", dest="pages", action="store_true", help="update all the pages in the replay file, recording it again.")def process_options(self, args, opts):- ScrapyCommand.process_options(self, args, opts)- self.opts = opts- self.action = args[1] if len(args) > 1 else 'crawl'- mode = 'update' if self.action == 'update' else 'play'- usedir = args and os.path.isdir(args[0])- self.replay = Replay(args[0], mode=mode, usedir=usedir)- if self.action not in ['crawl', 'diff', 'update']:- settings.overrides['LOG_ENABLED'] = False+ if args:+ ScrapyCommand.process_options(self, args, opts)+ self.opts = opts+ self.action = args[1] if len(args) > 1 else 'crawl'+ mode = 'update' if self.action == 'update' else 'play'+ usedir = args and os.path.isdir(args[0])+ self.replay = Replay(args[0], mode=mode, usedir=usedir)+ if self.action not in ['crawl', 'diff', 'update']:+ settings.overrides['LOG_ENABLED'] = Falsedef run(self, args, opts):if not args: