From 8283f4dbc2eeb8959d6fe059570d74666cd56dad Mon Sep 17 00:00:00 2001 From: Babak Farrokhi Date: Tue, 23 Jan 2018 12:25:46 +0330 Subject: [PATCH] Ability to have comments in resolvers list (Closes #43) --- dnseval.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dnseval.py b/dnseval.py index a53b8dd..6af1bd4 100755 --- a/dnseval.py +++ b/dnseval.py @@ -266,7 +266,9 @@ def main(): if len(f) == 0: print("No nameserver specified") - f = [name.strip() for name in f] + f = [name.strip() for name in f] # remove annoying blanks + f = [x for x in f if not x.startswith('#') and len(x)] # remove comments and empty entries + width = maxlen(f) blanks = (width - 5) * ' ' print('server ', blanks, ' avg(ms) min(ms) max(ms) stddev(ms) lost(%) ttl flags')