diff options
author | Casey Deccio <casey@deccio.net> | 2020-12-30 09:47:40 +0300 |
---|---|---|
committer | Casey Deccio <casey@deccio.net> | 2020-12-30 09:47:40 +0300 |
commit | 78bbcc9cdcfda2f8ffa92dce75cf8fdd5555ba80 (patch) | |
tree | 6beb81c0532b6f61c8306d06c8b3cdf74b9b75ad | |
parent | 5e4b2ebe6a891dde8724c682b182ad0bb1e99389 (diff) |
Add meaningful comments
-rw-r--r-- | dnsviz/analysis/offline.py | 6 |
1 files changed, 6 insertions, 0 deletions
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')) |