linkcheck: Use old-style string formatting to fix gettext (#12560)

This commit is contained in:
James Addison
2024-07-13 17:45:16 +01:00
committed by GitHub
parent aa6dac81ec
commit 7011459fe9

View File

@@ -473,7 +473,7 @@ class HyperlinkAvailabilityCheckWorker(Thread):
) as response:
if (self.check_anchors and response.ok and anchor
and not contains_anchor(response, anchor)):
raise Exception(__(f'Anchor {quote(anchor)!r} not found'))
raise Exception(__("Anchor '%s' not found") % quote(anchor))
# Copy data we need from the (closed) response
status_code = response.status_code