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

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



commit c7124d2727066f62c2dede31b4f36b391ec88fe7
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date:   Tue Apr 21 22:20:52 2020 +0300

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

diff --git a/stem/control.py b/stem/control.py
index 7cfd3197..66c8b567 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -3737,7 +3737,7 @@ class Controller(BaseController):
 
     return value
 
-  def map_address(self, mapping: Mapping[str, str]) -> Dict[str, str]:
+  async def map_address(self, mapping: Mapping[str, str]) -> Dict[str, str]:
     """
     Map addresses to replacement addresses. Tor replaces subseqent connections
     to the original addresses with the replacement addresses.
@@ -3757,7 +3757,7 @@ class Controller(BaseController):
     """
 
     mapaddress_arg = ' '.join(['%s=%s' % (k, v) for (k, v) in list(mapping.items())])
-    response = self.msg('MAPADDRESS %s' % mapaddress_arg)
+    response = await self.msg('MAPADDRESS %s' % mapaddress_arg)
     return stem.response._convert_to_mapaddress(response).entries
 
   def drop_guards(self) -> None:



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