[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Make `Controller.remove_hidden_service` asynchronous
commit fab5e14bfaad34ec6eb4f675d2f0b2a40b8e6246
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date: Tue Apr 21 23:14:20 2020 +0300
Make `Controller.remove_hidden_service` asynchronous
---
stem/control.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index 78c70991..6648727f 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -2750,7 +2750,7 @@ class Controller(BaseController):
config = conf,
)
- def remove_hidden_service(self, path: str, port: Optional[int] = None) -> bool:
+ async def remove_hidden_service(self, path: str, port: Optional[int] = None) -> bool:
"""
Discontinues a given hidden service.
@@ -2769,7 +2769,7 @@ class Controller(BaseController):
raise ValueError("%s isn't a valid port number" % port)
port = int(port) if port else None
- conf = self.get_hidden_service_conf()
+ conf = await self.get_hidden_service_conf()
if path not in conf:
return False
@@ -2788,7 +2788,7 @@ class Controller(BaseController):
if not conf[path]['HiddenServicePort']:
del conf[path] # no ports left
- self.set_hidden_service_conf(conf)
+ await self.set_hidden_service_conf(conf)
return True
@with_default()
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits