documentation_crawler: Fix for Twisted 21.2.0 type hints.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-03-03 12:52:27 -08:00 committed by Tim Abbott
parent b8e5e34c01
commit d6cdd279d0
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ class BaseDocumentationSpider(scrapy.Spider):
return url in EXCLUDED_URLS
def error_callback(self, failure: Failure) -> Optional[Union[Failure, Iterator[Request]]]:
if failure.check(HttpError):
if isinstance(failure.value, HttpError):
response = failure.value.response
if self.exclude_error(response.url):
return None