[tor-commits] [stem/master] Make `Controller.list_ephemeral_hidden_services` asynchronous
atagar at torproject.org
atagar at torproject.org
Thu Jul 16 01:28:59 UTC 2020
commit c3411da131f40e1ab79c3f7b6ee5a45d06b444f6
Author: Illia Volochii <illia.volochii at gmail.com>
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
More information about the tor-commits
mailing list