Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #24705

Closed
Open
Created Dec 22, 2017 by teor@teor

stem's get_consensus().run() always returns a list, but DocumentHandler implies it returns an object

When I read the stem DocumentHandler documentation for DOCUMENT, it syas that it returns a NetworkStatusDocument:

https://stem.torproject.org/api/descriptor/descriptor.html#stem.descriptor.__init__.DocumentHandler

But when I call:

stem.descriptor.remote.get_consensus(document_handler='DOCUMENT').run()

It actually returns a list of NetworkStatusDocuments with one entry.

I understand why this happens (you might be reading a list of consensuses), but it's confusing.

Please document this behaviour in one or more of get_consensus(), run(), or DocumentHandler DOCUMENT/BARE_DOCUMENT.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking