spiders: Set error status for exceptions generated by spider.

Spider raises exceptions when errors like FileNotFound
are detected. However, these did not set error state
before exiting causing spider to fail silently.

This patch sets the status causing exceptions to exit with
non-zero exit status.
This commit is contained in:
sumanthvrao
2019-04-06 02:48:48 +00:00
committed by Tim Abbott
parent f852868673
commit c5de6d0e18

View File

@@ -121,5 +121,6 @@ class BaseDocumentationSpider(scrapy.Spider):
elif isinstance(failure.type, IOError):
self._set_error_state()
else:
self._set_error_state()
raise Exception(failure.value)
return None