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

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



commit c3411da131f40e1ab79c3f7b6ee5a45d06b444f6
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date:   Tue Apr 21 22:58:07 2020 +0300

    Make `Controller.list_ephemeral_hidden_services` asynchronous
---
 stem/control.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index 93b7b924..618408c3 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -2792,7 +2792,7 @@ class Controller(BaseController):
     return True
 
   @with_default()
-  def list_ephemeral_hidden_services(self, default: Any = UNDEFINED, our_services: bool = True, detached: bool = False) -> Sequence[str]:
+  async def list_ephemeral_hidden_services(self, default: Any = UNDEFINED, our_services: bool = True, detached: bool = False) -> Sequence[str]:
     """
     list_ephemeral_hidden_services(default = UNDEFINED, our_services = True, detached = False)
 
@@ -2821,11 +2821,11 @@ class Controller(BaseController):
     result = []
 
     if our_services:
-      result += self.get_info('onions/current').split('\n')
+      result += (await self.get_info('onions/current')).split('\n')
 
     if detached:
       try:
-        result += self.get_info('onions/detached').split('\n')
+        result += (await self.get_info('onions/detached')).split('\n')
       except (stem.ProtocolError, stem.OperationFailed) as exc:
         if 'No onion services of the specified type.' not in str(exc):
           raise



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