Skip to content

Commit

Permalink
Add LifetimeTimeout exception
Browse files Browse the repository at this point in the history
  • Loading branch information
nickspaargaren committed Jan 6, 2024
1 parent 52179b5 commit 0398760
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,3 @@ jobs:
run: |
cd scripts
python3 tests.py --type regex
dns-check:
name: Checking dns response for domains
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
name: Python setup
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install pytest
run: pip install pytest
- name: Check if list includes domains without dns response
run: |
cd scripts
python3 dnscheck.py
11 changes: 6 additions & 5 deletions scripts/dnscheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ def check_domain(domain):
if answer.qname:
return True
return False
except dns.resolver.NoAnswer:
return False
except dns.resolver.NoNameservers:
return False
except dns.resolver.NXDOMAIN:
except (
dns.resolver.NoAnswer,
dns.resolver.NXDOMAIN,
dns.resolver.NoNameservers,
dns.resolver.LifetimeTimeout,
):
return False


Expand Down

0 comments on commit 0398760

Please sign in to comment.