commit ca1af74eab7dc1670beb1287a7795d99c92d08fe Author: Isis Lovecruft isis@torproject.org Date: Tue Aug 26 00:46:40 2014 +0000
Follow Damian's advice to use list(document) to get Stem `RelayDescriptor`s.
See https://bugs.torproject.org/9380#comment:16. --- lib/bridgedb/parse/descriptors.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/bridgedb/parse/descriptors.py b/lib/bridgedb/parse/descriptors.py index bedc0b1..cfb895e 100644 --- a/lib/bridgedb/parse/descriptors.py +++ b/lib/bridgedb/parse/descriptors.py @@ -82,8 +82,7 @@ def parseServerDescriptorsFile(filename, validate=False): logging.info("Parsing server descriptors with Stem: %s" % filename) descriptorType = 'server-descriptor 1.0' document = parse_file(filename, descriptorType, validate=validate) - - routers = [router for router in document] + routers = list(document) return routers
def deduplicate(descriptors):