commit 803ce0995ce428f0f21986f13162e347c2358a57 Author: Isis Lovecruft isis@torproject.org Date: Tue Aug 26 01:48:17 2014 +0000
Fix parseNetworkStatusFile() to actually return a dict.
Previously, it was returning a BridgeNetworkStatusDocument class. --- lib/bridgedb/parse/descriptors.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/bridgedb/parse/descriptors.py b/lib/bridgedb/parse/descriptors.py index cfb895e..362731f 100644 --- a/lib/bridgedb/parse/descriptors.py +++ b/lib/bridgedb/parse/descriptors.py @@ -27,8 +27,8 @@ def parseNetworkStatusFile(filename, validate=True): """Parse a file which contains an ``@type bridge-networkstatus`` document.
:rtype: dict - :returns: A dictionary of - :api:`stem.descriptor.router_status_entry.RouterStatusEntryV2`. + :returns: A dictionary fingerprints mapped to + :api:`stem.descriptor.router_status_entry.RouterStatusEntryV2`s. """ logging.info("Parsing networkstatus entries with Stem: %s" % filename)
@@ -55,9 +55,9 @@ def parseNetworkStatusFile(filename, validate=True): ("Networkstatus file '%s' started with 'published' line! Please " "revise this function!") % filename)
- routers = networkstatus.BridgeNetworkStatusDocument(descriptors, - validate=validate) - return routers + document = networkstatus.BridgeNetworkStatusDocument(descriptors, + validate=validate) + return document.routers
def parseServerDescriptorsFile(filename, validate=False): """Parse a file which contains ``@type bridge-server-descriptor``s.
tor-commits@lists.torproject.org