dnc

CLI tool to check domain names configuration and statistics
Log | Files | Refs | README | LICENSE

commit 8143c4eb7d1c48d9e906ace225860a8928a97e34
parent de05ad25cb18dd43a7377f220b0116a7bb7584f8
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed, 24 Feb 2021 12:34:28 +0100

Do not use bare 'except' in the query() function.

Diffstat:
Mdnc.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dnc.py b/dnc.py @@ -34,7 +34,7 @@ def usage(): def query(domain: str, rrtype: str) -> str: try: answers = dns.resolver.resolve(domain, rrtype) - except: + except dns.exception.DNSException: return "" return "\n".join([rdata.to_text() for rdata in answers])