[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Make `Controller.get_version` asynchronous
commit 9864b4838437f69bd1c61874d35c0b0c518e50ba
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date: Wed Apr 15 21:52:07 2020 +0300
Make `Controller.get_version` asynchronous
---
stem/control.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index dd723db4..c55d7015 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1238,7 +1238,7 @@ class Controller(BaseController):
raise
@with_default()
- def get_version(self, default: Any = UNDEFINED) -> stem.version.Version:
+ async def get_version(self, default: Any = UNDEFINED) -> stem.version.Version:
"""
get_version(default = UNDEFINED)
@@ -1260,7 +1260,7 @@ class Controller(BaseController):
version = self._get_cache('version')
if not version:
- version_str = self.get_info('version')
+ version_str = await self.get_info('version')
version = stem.version.Version(version_str[4:] if version_str.startswith('Tor ') else version_str)
self._set_cache({'version': version})
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits