added deprecation messages to queue and runserver commands

This commit is contained in:
Pablo Hoffman 2010-12-12 20:04:35 -02:00
parent b19ff21acd
commit 6f2cea4775
2 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,10 @@ class Command(runserver.Command):
raise UsageError()
cmd = args[0]
import warnings
warnings.warn("Scrapy queue command is deprecated - use Scrapyd instead.", \
DeprecationWarning)
q = self.crawler.queue._queue
if cmd == 'add' and len(args) < 2:

View File

@ -10,4 +10,7 @@ class Command(ScrapyCommand):
return "Deprecated command. Use 'server' command instead"
def run(self, args, opts):
import warnings
warnings.warn("Scrapy queue command is deprecated - use 'server' command instead.", \
DeprecationWarning)
self.crawler.start()