Count as error only for 4xx and 5xx http status codes (#2407)

This commit is contained in:
Matheus Felipe 2021-10-22 23:43:11 -03:00 committed by GitHub
commit 846e338a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ def validate_links(links):
}) })
code = int(resp[0]['status']) code = int(resp[0]['status'])
# Checking status code errors # Checking status code errors
if (code >= 300): if (code >= 400):
hasError = True hasError = True
print(f"ERR:CLT:{code} : {link}") print(f"ERR:CLT:{code} : {link}")
except TimeoutError: except TimeoutError: