Merge pull request #406 from nopper/master

Handling inconsistencies among Twisted releases
This commit is contained in:
Pablo Hoffman 2013-10-01 09:59:00 -07:00
commit fe9ae1d46a
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ Scrapy web services extension
See docs/topics/webservice.rst
"""
from twisted.web import server, error
from twisted.web import server, resource
from scrapy.exceptions import NotConfigured
from scrapy import log, signals
@ -45,7 +45,7 @@ class JsonRpcResource(JsonResource):
newtarget = getattr(target, name)
return JsonRpcResource(self.crawler, newtarget)
except AttributeError:
return error.NoResource("No such child resource.")
return resource.ErrorPage(404, "No Such Resource", "No such child resource.")
def get_target(self):
return self._target