[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Make `Controller.remove_event_listener` asynchronous
commit 916afa92b61b9e9dc95c6d0fdf343ad1d8bf62a2
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date: Fri Apr 17 23:06:02 2020 +0300
Make `Controller.remove_event_listener` asynchronous
---
stem/control.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index 37e9c689..1a107a79 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -3092,7 +3092,7 @@ class Controller(BaseController):
if failed_events:
raise stem.ProtocolError('SETEVENTS rejected %s' % ', '.join(failed_events))
- def remove_event_listener(self, listener: Callable[[stem.response.events.Event], None]) -> None:
+ async def remove_event_listener(self, listener: Callable[[stem.response.events.Event], None]) -> None:
"""
Stops a listener from being notified of further tor events.
@@ -3113,7 +3113,7 @@ class Controller(BaseController):
del self._event_listeners[event_type]
if event_types_changed:
- response = self.msg('SETEVENTS %s' % ' '.join(self._event_listeners.keys()))
+ response = await self.msg('SETEVENTS %s' % ' '.join(self._event_listeners.keys()))
if not response.is_ok():
raise stem.ProtocolError('SETEVENTS received unexpected response\n%s' % response)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits