Error code outside of its visibility

This commit is contained in:
Stephane Bortzmeyer 2023-03-15 19:53:12 +00:00
parent b3709c64e9
commit 9dc05e9c7b

View File

@ -140,14 +140,14 @@ for server in servers:
server = server[:-1] # Donuts RDAP server balks when there are two slashes and reply 404
try:
response = requests.get("%s/domain/%s" % (server, domain), timeout=timeout)
if response.status_code != 200:
errors += "Invalid RDAP return code at %s: %s " % \
(server, response.status_code)
else:
found = True
break
except requests.exceptions.Timeout:
unknowns += "Timeout when trying to reach %s " % server
if response.status_code != 200:
errors += "Invalid RDAP return code at %s: %s " % \
(server, response.status_code)
else:
found = True
break
if not found:
if errors != "":
error(errors)