tools: Remove obsolete _set_error_state method in linter spider.

In 2f547ea, the custom `has_error` logic in BaseDocumentationSpider
was removed in favor of checking whether any errors were logged.

One reference to that method was missed in UnusedImagesLinterSpider
and went unremarked as no images were added to the documentation
that were not used.

Replaces that reference with an error log.
This commit is contained in:
Lauryn Menard
2022-11-09 12:21:59 +01:00
committed by Tim Abbott
parent 233e690fb4
commit 53df35e698

View File

@@ -33,11 +33,10 @@ class UnusedImagesLinterSpider(BaseDocumentationSpider):
exception_message = (
"The following images are not used in documentation and can be removed: {}"
)
self._set_error_state()
unused_images_relatedpath = [
os.path.join(self.images_path, img) for img in unused_images
]
raise Exception(exception_message.format(", ".join(unused_images_relatedpath)))
self.logger.error(exception_message.format(", ".join(unused_images_relatedpath)))
class HelpDocumentationSpider(UnusedImagesLinterSpider):