commit f3d173eaa364cbd2982f3713cf628bbf25881194 Author: Illia Volochii illia.volochii@gmail.com Date: Wed Apr 15 22:12:27 2020 +0300
Make `Controller.get_start_time` asynchronous --- stem/control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/stem/control.py b/stem/control.py index 88778a8e..f847207f 100644 --- a/stem/control.py +++ b/stem/control.py @@ -1600,7 +1600,7 @@ class Controller(BaseController): raise ValueError("Unable to resolve tor's pid" if self.is_localhost() else "Tor isn't running locally")
@with_default() - def get_start_time(self, default: Any = UNDEFINED) -> float: + async def get_start_time(self, default: Any = UNDEFINED) -> float: """ get_start_time(default = UNDEFINED)
@@ -1621,7 +1621,7 @@ class Controller(BaseController): if start_time: return start_time
- uptime = self.get_info('uptime', None) + uptime = await self.get_info('uptime', None)
if uptime: if not uptime.isdigit(): @@ -1636,7 +1636,7 @@ class Controller(BaseController): if not self.is_localhost(): raise ValueError('Unable to determine the uptime when tor is not running locally')
- pid = self.get_pid(None) + pid = await self.get_pid(None)
if not pid: raise ValueError('Unable to determine the pid of the tor process')