Skip to content

Commit

Permalink
[dns] let checks continue
Browse files Browse the repository at this point in the history
  • Loading branch information
aliel committed Oct 5, 2023
1 parent e60f058 commit f9fd108
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/aleph/sdk/domain.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
from enum import Enum
from ipaddress import IPv6Address
from typing import Dict, Iterable, List, Optional, NewType, Union
from typing import Dict, Iterable, List, NewType, Optional, Union
from urllib.parse import urlparse

import aiodns
Expand Down Expand Up @@ -104,7 +104,11 @@ async def check_domain(
record_type = dns_rule["dns"]["type"]
record_value = dns_rule["dns"]["value"]

entries = await self.resolver.query(record_name, record_type.upper())
try:
entries = await self.resolver.query(record_name, record_type.upper())
except aiodns.error.DNSError:
"""Continue checks"""
entries = None

if entries and record_type == "txt":
for entry in entries:
Expand Down Expand Up @@ -176,8 +180,8 @@ def get_required_dns_rules(
"name": f"_control.{hostname}",
"value": owner,
},
"info": f"Create a TXT record for _control.{hostname} with value = owner address",
"on_error": f"Owner address mismatch",
"info": f"Create a TXT record for _control.{hostname} with value {owner}",
"on_error": "Owner address mismatch",
}
)

Expand Down

0 comments on commit f9fd108

Please sign in to comment.