ignore request if spider is not opened in downloader when called from engine.download

This commit is contained in:
Daniel Grana 2009-09-28 12:44:05 -03:00
parent 749b136595
commit e0ccb2cceb
1 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,9 @@ class ExecutionEngine(object):
self.next_request(spider)
return _
if spider not in self.downloader.sites:
return defer.fail(Failure(IgnoreRequest())).addBoth(_on_complete)
dwld = mustbe_deferred(self.downloader.fetch, request, spider)
dwld.addCallbacks(_on_success, _on_error)
dwld.addBoth(_on_complete)