linkcheck: Raise on unknown status in process_result()

Helps catching programming errors. The else clause should never be
reached.
This commit is contained in:
François Freitag 2021-01-27 17:11:41 +01:00
parent a3e83a80f0
commit 227955cbe8
No known key found for this signature in database
GPG Key ID: 0CD53670BCA9253D

View File

@ -428,6 +428,8 @@ class CheckExternalLinksBuilder(DummyBuilder):
self.write_entry('redirected ' + text, docname, filename,
lineno, uri + ' to ' + info)
self.write_linkstat(linkstat)
else:
raise ValueError("Unknown status %s." % status)
def write_entry(self, what: str, docname: str, filename: str, line: int,
uri: str) -> None: