dnc

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

commit 01cb02863f7a0f1210428a12b50ff2797a7d9778
parent cc828689b161ddf7d06538207c27dbc424030062
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 19 Jan 2021 14:44:28 +0100

Linting.

Diffstat:
Mdnc.py | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/dnc.py b/dnc.py @@ -23,13 +23,14 @@ from prettytable import PrettyTable socket.setdefaulttimeout(1) + def query(domain: str, rrtype: str) -> str: try: answers = dns.resolver.resolve(domain, rrtype) except: - return '' + return "" - return '\n'.join([rdata.to_text() for rdata in answers]) + return "\n".join([rdata.to_text() for rdata in answers]) def tls(domain: str, _: str) -> str: @@ -63,16 +64,16 @@ def main(): for option, arg in options: if option == "-4": header.append("IPv4") - actions.append((query, 'A')) + actions.append((query, "A")) if option == "-6": header.append("IPv6") - actions.append((query, 'AAAA')) + actions.append((query, "AAAA")) if option == "-m": header.append("MX") - actions.append((query, 'MX')) + actions.append((query, "MX")) if option == "-n": header.append("NS") - actions.append((query, 'NS')) + actions.append((query, "NS")) if option == "-s": header.append("TLS") actions.append((tls, None))