From 78bbcc9cdcfda2f8ffa92dce75cf8fdd5555ba80 Mon Sep 17 00:00:00 2001 From: Casey Deccio Date: Tue, 29 Dec 2020 23:47:40 -0700 Subject: Add meaningful comments --- dnsviz/analysis/offline.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dnsviz/analysis/offline.py b/dnsviz/analysis/offline.py index 3939cfb..7d08a83 100644 --- a/dnsviz/analysis/offline.py +++ b/dnsviz/analysis/offline.py @@ -463,8 +463,11 @@ class OfflineDomainNameAnalysis(OnlineDomainNameAnalysis): warnings = [w.terse_description for w in response_info.name_obj.nodata_warnings[info]] errors = [e.terse_description for e in response_info.name_obj.nodata_errors[info]] + # never show the negative response if show_neg_response is False if show_neg_response is False: return None + # only show the negative response if there is a corresponding + # status or show_neg_response is True if not self.nodata_status[info] and not show_neg_response: return None rdata_tup.append((None, [], [], 'NODATA')) @@ -476,8 +479,11 @@ class OfflineDomainNameAnalysis(OnlineDomainNameAnalysis): warnings = [w.terse_description for w in response_info.name_obj.nxdomain_warnings[info]] errors = [e.terse_description for e in response_info.name_obj.nxdomain_errors[info]] + # never show the negative response if show_neg_response is False if show_neg_response is False: return None + # only show the negative response if there is a corresponding + # status or show_neg_response is True if not self.nxdomain_status[info] and not show_neg_response: return None rdata_tup.append((None, [], [], 'NXDOMAIN')) -- cgit v1.2.3