Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2015-08-24 22:51:35 +0300
committerCasey Deccio <casey@deccio.net>2015-08-24 22:51:35 +0300
commit0550b8a883001012aefc7fe9e29133a01a6dc0f4 (patch)
tree95a3c82b09353e7a65791b736e38c4f67161891e /bin
parent0069ee49295fca24d3fc936bffb794abe6846a24 (diff)
indent properly
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dnsviz15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/dnsviz b/bin/dnsviz
index 2997b41..dc7a4c1 100755
--- a/bin/dnsviz
+++ b/bin/dnsviz
@@ -173,6 +173,7 @@ def textualize_status_output(names, show_color):
in_neg_response = False
soa_seen = False
+ prev_rdtype_str = ''
for rdtype_str, status, rdata in responses:
# consider the cases in which we might no longer be in a negative
@@ -192,12 +193,17 @@ def textualize_status_output(names, show_color):
params['status'] = STATUS_MAP[status]
if in_neg_response:
params['indent'] = ' '
+ if rdtype_str.startswith('NSEC'):
+ params['indent'] += ' '
+ elif rdtype_str == 'RRSIG':
+ if prev_rdtype_str.startswith('NSEC'):
+ params['indent'] += ' '
+ else:
+ params['indent'] += ' '
else:
params['indent'] = ''
- if rdtype_str.startswith('NSEC'):
- params['indent'] += ' '
- if rdtype_str == 'RRSIG':
- params['indent'] += ' '
+ if rdtype_str == 'RRSIG':
+ params['indent'] += ' '
if show_color:
params['status_color'] = TERM_COLOR_MAP[status]
s += response_prefix % params
@@ -225,6 +231,7 @@ def textualize_status_output(names, show_color):
if rdata[0][1] in ('NXDOMAIN', 'NODATA'):
in_neg_response = True
soa_seen = False
+ prev_rdtype_str = rdtype_str
return s