[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit a651e8d16653fc9f0f0adb1a9bd4d6f35ba8a59a
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date:   Mon Apr 20 22:17:07 2020 +0300

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

diff --git a/stem/control.py b/stem/control.py
index 81f97581..443a16db 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -2473,7 +2473,7 @@ class Controller(BaseController):
         raise stem.ProtocolError('Returned unexpected status code: %s' % response.code)
 
   @with_default()
-  def get_hidden_service_conf(self, default: Any = UNDEFINED) -> Dict[str, Any]:
+  async def get_hidden_service_conf(self, default: Any = UNDEFINED) -> Dict[str, Any]:
     """
     get_hidden_service_conf(default = UNDEFINED)
 
@@ -2519,7 +2519,7 @@ class Controller(BaseController):
     start_time = time.time()
 
     try:
-      response = stem.response._convert_to_getconf(self.msg('GETCONF HiddenServiceOptions'))
+      response = stem.response._convert_to_getconf(await self.msg('GETCONF HiddenServiceOptions'))
       log.debug('GETCONF HiddenServiceOptions (runtime: %0.4f)' %
                 (time.time() - start_time))
     except stem.ControllerError as exc:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits