mirror of https://github.com/zulip/zulip.git
documentation_crawler: Fix for Twisted 21.2.0 type hints.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
b8e5e34c01
commit
d6cdd279d0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue