[tor-commits] [stem/master] Make `Controller.signal` asynchronous

atagar at torproject.org atagar at torproject.org
Thu Jul 16 01:28:58 UTC 2020


commit da8fbf7079a4573b7061b336025acd3edc8f340c
Author: Illia Volochii <illia.volochii at gmail.com>
Date:   Tue Apr 21 22:16:00 2020 +0300

    Make `Controller.signal` asynchronous
---
 stem/control.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index f63df7bc..ee6f7aa3 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -3646,7 +3646,7 @@ class Controller(BaseController):
       else:
         raise stem.ProtocolError('CLOSESTREAM returned unexpected response code: %s' % response.code)
 
-  def signal(self, signal: stem.Signal) -> None:
+  async def signal(self, signal: stem.Signal) -> None:
     """
     Sends a signal to the Tor client.
 
@@ -3657,7 +3657,7 @@ class Controller(BaseController):
       * :class:`stem.InvalidArguments` if signal provided wasn't recognized
     """
 
-    response = stem.response._convert_to_single_line(self.msg('SIGNAL %s' % signal))
+    response = stem.response._convert_to_single_line(await self.msg('SIGNAL %s' % signal))
 
     if response.is_ok():
       if signal == stem.Signal.NEWNYM:





More information about the tor-commits mailing list