Make exit_used.py compatible with asyncio
commit7e9ea4dbb80e81d2a977937ccfca57bb41e20270
authorDamian Johnson <atagar@torproject.org>
Thu, 18 Nov 2021 21:42:22 +0000 (18 13:42 -0800)
committerDamian Johnson <atagar@torproject.org>
Thu, 18 Nov 2021 21:44:42 +0000 (18 13:44 -0800)
tree9a789679c1bbcd2314dee23693ffcb2fb1702d82
parent36bcb170ba9097885902513640075eac2e6ce384
Make exit_used.py compatible with asyncio

Honestly this is probably somewhat a step backward because if I return to Stem
I plan to substantially revert the asyncio migration, but for now simply fixing
the script. With the current codebase it fails with...

  % python exit_used.py
  Tracking requests for tor exits. Press 'enter' to end.

  stem/stem/control.py:4004: RuntimeWarning: coroutine 'Controller.get_circuit' was never awaited
    log.warn('Event listener raised an uncaught exception (%s): %s' % (exc, event))
docs/_static/example/exit_used.py