commit 813ba31ecf0e97bf4f620ef869492087825aac4c Author: aagbsn aagbsn@extc.org Date: Sat Dec 1 19:09:16 2012 +0000
Allow test resolver file to have comments
The test resolver file may contain comments like so:
8.8.8.8 # google public dns 208.67.222.222 # open dns --- nettests/blocking/dnstamper.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/nettests/blocking/dnstamper.py b/nettests/blocking/dnstamper.py index f663276..67f02c9 100644 --- a/nettests/blocking/dnstamper.py +++ b/nettests/blocking/dnstamper.py @@ -61,7 +61,7 @@ class DNSTamperTest(dnst.DNSTest):
try: with open(test_resolvers_file) as f: - self.test_resolvers = [x.strip() for x in f.readlines()] + self.test_resolvers = [x.split('#')[0].strip() for x in f.readlines()] self.report['test_resolvers'] = self.test_resolvers fp.close()