[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Make `Controller.get_effective_rate` asynchronous
commit f36db8793d671a3658155b146eb7374ee81cd770
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date: Tue Apr 21 22:17:36 2020 +0300
Make `Controller.get_effective_rate` asynchronous
---
stem/control.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index ee6f7aa3..370b6270 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -3698,7 +3698,7 @@ class Controller(BaseController):
return max(0.0, self._last_newnym + 10 - time.time())
@with_default()
- def get_effective_rate(self, default: Any = UNDEFINED, burst: bool = False) -> int:
+ async def get_effective_rate(self, default: Any = UNDEFINED, burst: bool = False) -> int:
"""
get_effective_rate(default = UNDEFINED, burst = False)
@@ -3728,7 +3728,7 @@ class Controller(BaseController):
value = None
for attr in attributes:
- attr_value = int(self._get_conf_single(attr))
+ attr_value = int(await self._get_conf_single(attr))
if attr_value == 0 and attr.startswith('Relay'):
continue # RelayBandwidthRate and RelayBandwidthBurst default to zero
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits