[tor-bugs] #28400 [Core Tor/Stem]: Documentation for Query talks about using run() to get errors, but it's not in the example

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Nov 11 19:33:01 UTC 2018


#28400: Documentation for Query talks about using run() to get errors, but it's not
in the example
-------------------------------+--------------------
     Reporter:  irl            |      Owner:  atagar
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:
    Component:  Core Tor/Stem  |    Version:
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+--------------------
 {{{
 from stem.descriptor.remote import Query

 query = Query(
   '/tor/server/all',
   block = True,
   timeout = 30,
 )

 print('Current relays:')

 if not query.error:
   for desc in query:
     print(desc.fingerprint)
 else:
   print('Unable to retrieve the server descriptors: %s' % query.error)
 }}}

 It's just iterating as in the example below it.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28400>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list