[tor-commits] [ooni-probe/master] Skip comment lines.
art at torproject.org
art at torproject.org
Mon Mar 24 15:02:47 UTC 2014
commit 106718a950a27ef0d98869e25d57c1e09e0f671b
Author: Arturo Filastò <art at fuffa.org>
Date: Sun Mar 9 22:51:36 2014 +0100
Skip comment lines.
---
ooni/nettest.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ooni/nettest.py b/ooni/nettest.py
index e9cc43b..235ad85 100644
--- a/ooni/nettest.py
+++ b/ooni/nettest.py
@@ -705,8 +705,12 @@ class NetTestCase(object):
with open(filename) as f:
for line in f:
l = line.strip()
+ # Skip empty lines
if not l:
continue
+ # Skip comment lines
+ elif l.startswith('#'):
+ continue
yield l
@property
More information about the tor-commits
mailing list