Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erbek/fix nxdomain error #37837

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
import time
from urllib.parse import urlparse
import dns.resolver
from dns.resolver import NXDOMAIN, YXDOMAIN, LifetimeTimeout, NoNameservers # cspell:disable-line
from dns.resolver import (
NXDOMAIN, # cspell:disable-line
YXDOMAIN, # cspell:disable-line
LifetimeTimeout, # cspell:disable-line
NoNameservers, # cspell:disable-line
) # cspell:disable-line
from dns.rdatatype import SRV # cspell:disable-line

request_retry_period = 5 # seconds
Expand Down Expand Up @@ -87,6 +92,8 @@ def _request_record(request):
return [] # No records found
except (LifetimeTimeout, NoNameservers):
continue
except Exception as e: # Handle all other errors
return []
return None # Timeout


Expand Down
Loading