[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r15144: Handle comment lines in proxy list files (bridgedb/trunk/lib/bridgedb)
Author: nickm
Date: 2008-06-11 18:25:42 -0400 (Wed, 11 Jun 2008)
New Revision: 15144
Modified:
bridgedb/trunk/lib/bridgedb/Main.py
Log:
Handle comment lines in proxy list files
Modified: bridgedb/trunk/lib/bridgedb/Main.py
===================================================================
--- bridgedb/trunk/lib/bridgedb/Main.py 2008-06-11 22:10:27 UTC (rev 15143)
+++ bridgedb/trunk/lib/bridgedb/Main.py 2008-06-11 22:25:42 UTC (rev 15144)
@@ -147,7 +147,9 @@
f = open(fname, 'r')
for line in f:
line = line.strip()
- if Bridges.is_valid_ip(line):
+ if line.startswith("#"):
+ continue
+ elif Bridges.is_valid_ip(line):
ipset[line] = True
elif line:
logging.info("Skipping line %r in %s: not an IP.",