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

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



commit 0355c06962d9c807b6330d36eb363d6cfb5ba162
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date:   Tue Apr 21 22:27:26 2020 +0300

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

diff --git a/stem/control.py b/stem/control.py
index b36497a5..f8fae01e 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -3320,7 +3320,7 @@ class Controller(BaseController):
 
     return feature in self._enabled_features
 
-  def enable_feature(self, features: Union[str, Sequence[str]]) -> None:
+  async def enable_feature(self, features: Union[str, Sequence[str]]) -> None:
     """
     Enables features that are disabled by default to maintain backward
     compatibility. Once enabled, a feature cannot be disabled and a new
@@ -3337,7 +3337,7 @@ class Controller(BaseController):
     if isinstance(features, (bytes, str)):
       features = [features]
 
-    response = stem.response._convert_to_single_line(self.msg('USEFEATURE %s' % ' '.join(features)))
+    response = stem.response._convert_to_single_line(await self.msg('USEFEATURE %s' % ' '.join(features)))
 
     if not response.is_ok():
       if response.code == '552':



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