Documentation for Query talks about using run() to get errors, but it's not in the example
View options
- Truncate descriptions
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.
- Show labels
- Show closed items