dnc

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

commit bbbc652561510d717b9586ec090cdbdf1d2ab6d8
parent 3b6bf6b8a26eb5c9495517046dd95fb86c1176e5
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon,  4 Jan 2021 20:38:48 +0100

Get rid of intermediate variables when creating rows.

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

diff --git a/dnc.py b/dnc.py @@ -6,7 +6,7 @@ # https://github.com/fcambus/dnc # # Created: 2014-02-11 -# Last Updated: 2021-01-02 +# Last Updated: 2021-01-04 # # dnc is released under the BSD 2-Clause license. # See LICENSE file for details. @@ -51,14 +51,10 @@ def main(): x.align = "l" for name in args: - ns = query(name, 'NS') - a = query(name, 'A') - - row = [name, ns, a] + row = [name, query(name, 'NS'), query(name, 'A')] if getv6: - aaaa = query(name, 'AAAA') - row.append(aaaa) + row.append(query(name, 'AAAA')) x.add_row(row)