[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Change `skipHeaders` to `skipAnnotations` in b.p.d.parseNetworkStatusFile().
commit 95f6367e0e39b6ed0e43ee8eb33ced069f24e9ce
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Wed Sep 3 06:32:31 2014 +0000
Change `skipHeaders` to `skipAnnotations` in b.p.d.parseNetworkStatusFile().
In order to match the terminology used in Tor's source code.
---
lib/bridgedb/parse/descriptors.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/bridgedb/parse/descriptors.py b/lib/bridgedb/parse/descriptors.py
index 49d6e8a..6c6fd3e 100644
--- a/lib/bridgedb/parse/descriptors.py
+++ b/lib/bridgedb/parse/descriptors.py
@@ -24,7 +24,7 @@ from stem.descriptor.router_status_entry import RouterStatusEntryV3
from bridgedb import safelog
-def parseNetworkStatusFile(filename, validate=True, skipHeaders=True,
+def parseNetworkStatusFile(filename, validate=True, skipAnnotations=True,
descriptorClass=RouterStatusEntryV3):
"""Parse a file which contains an ``@type bridge-networkstatus`` document.
@@ -38,7 +38,7 @@ def parseNetworkStatusFile(filename, validate=True, skipHeaders=True,
:param bool validate: Passed along to Stem's parsers. If ``True``, the
descriptors will raise exceptions if they do not meet some definition
of correctness.
- :param bool skipHeaders: If ``True``, skip parsing everything before the
+ :param bool skipAnnotations: If ``True``, skip parsing everything before the
first ``r`` line.
:param descriptorClass: A class (probably from
:api:`stem.descriptors.router_status_entry`) which Stem will parse
@@ -55,7 +55,7 @@ def parseNetworkStatusFile(filename, validate=True, skipHeaders=True,
logging.info("Parsing networkstatus file: %s" % filename)
with open(filename) as fh:
position = fh.tell()
- if skipHeaders:
+ if skipAnnotations:
while not fh.readline().startswith('r '):
position = fh.tell()
logging.debug("Skipping %d bytes of networkstatus file." % position)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits