#28400 closed defect (fixed)

Documentation for Query talks about using run() to get errors, but it's not in the example

Reported by: irl Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (4)

comment:1 Changed 10 months ago by atagar

Resolution: fixed
Status: newclosed

Thanks irl, fixed.

comment:2 Changed 10 months ago by irl

The commit doesn't actually add a run()

comment:3 Changed 10 months ago by atagar

Resolution: fixed
Status: closedreopened

Baka! Sorry about that, added it in a local script but didn't run 'git add' afterward. :P

comment:4 Changed 10 months ago by atagar

Resolution: fixed
Status: reopenedclosed

Fixed for realz this time...

https://gitweb.torproject.org/stem.git/commit/?id=3768e1e

Thanks for the catch!

Note: See TracTickets for help on using tickets.