[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #28400 [Core Tor/Stem]: Documentation for Query talks about using run() to get errors, but it's not in the example
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs