[tor-commits] [stem/master] Dropping document_handler from get_consensus()
atagar at torproject.org
atagar at torproject.org
Sun Aug 11 23:36:33 UTC 2013
commit bb3de90a82ff927c5005fbadce3b2ea975a15aae
Author: Damian Johnson <atagar at torproject.org>
Date: Sun Aug 11 13:49:30 2013 -0700
Dropping document_handler from get_consensus()
Oops, the document_handler is already a query parameter. There's no benefit to
having a default value for it in get_consensus(), and that had the drawback of
preventing us from asserting a default value.
---
stem/descriptor/remote.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py
index 95934e1..40d9afe 100644
--- a/stem/descriptor/remote.py
+++ b/stem/descriptor/remote.py
@@ -517,7 +517,7 @@ class DescriptorDownloader(object):
return self.query('/tor/micro/d/%s.z' % '-'.join(hashes), **query_args)
- def get_consensus(self, authority_v3ident = None, document_handler = stem.descriptor.DocumentHandler.ENTRIES, **query_args):
+ def get_consensus(self, authority_v3ident = None, **query_args):
"""
Provides the present router status entries.
@@ -525,8 +525,6 @@ class DescriptorDownloader(object):
to get the consensus, see `'v3ident' in tor's config.c
<https://gitweb.torproject.org/tor.git/blob/f631b73:/src/or/config.c#l816>`_
for the values.
- :param stem.descriptor.__init__.DocumentHandler document_handler: method in
- which to parse the :class:`~stem.descriptor.networkstatus.NetworkStatusDocumentV3`
:param query_args: additional arguments for the
:class:`~stem.descriptor.remote.Query` constructor
@@ -539,7 +537,7 @@ class DescriptorDownloader(object):
if authority_v3ident:
resource += '/%s' % authority_v3ident
- return self.query(resource + '.z', document_handler = document_handler, **query_args)
+ return self.query(resource + '.z', **query_args)
def get_key_certificates(self, authority_v3idents = None, **query_args):
"""
More information about the tor-commits
mailing list