Merge pull request #6427 from tk0miya/5502_linkcheck_503_handling

Fix #5502: linkcheck: Consider HTTP 503 response as not an error
This commit is contained in:
Takeshi KOMIYA 2019-06-04 01:03:35 +09:00 committed by GitHub
commit df5dfe8f43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@ Bugs fixed
* py domain: duplicated warning does not point the location of source code
* #1125: html theme: scrollbar is hard to see on classic theme and macOS
* #5502: linkcheck: Consider HTTP 503 response as not an error
Testing
--------

View File

@ -159,6 +159,9 @@ class CheckExternalLinksBuilder(Builder):
if err.response.status_code == 401:
# We'll take "Unauthorized" as working.
return 'working', ' - unauthorized', 0
elif err.response.status_code == 503:
# We'll take "Service Unavailable" as ignored.
return 'ignored', str(err), 0
else:
return 'broken', str(err), 0
except Exception as err: