[tor-commits] [stem/master] Make `Controller.get_microdescriptors` asynchronous
atagar at torproject.org
atagar at torproject.org
Thu Jul 16 01:28:58 UTC 2020
commit e58d1226470d465c7a8c735ce5a47b73919ebfe8
Author: Illia Volochii <illia.volochii at gmail.com>
Date: Fri Apr 17 19:39:28 2020 +0300
Make `Controller.get_microdescriptors` asynchronous
---
stem/control.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index 0b716269..59f0ce9a 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1781,7 +1781,7 @@ class Controller(BaseController):
return stem.descriptor.microdescriptor.Microdescriptor(desc_content)
@with_default(yields = True)
- def get_microdescriptors(self, default: Any = UNDEFINED) -> Iterator[stem.descriptor.microdescriptor.Microdescriptor]:
+ async def get_microdescriptors(self, default: Any = UNDEFINED) -> Iterator[stem.descriptor.microdescriptor.Microdescriptor]:
"""
get_microdescriptors(default = UNDEFINED)
@@ -1803,7 +1803,7 @@ class Controller(BaseController):
default was provided
"""
- desc_content = self.get_info('md/all', get_bytes = True)
+ desc_content = await self.get_info('md/all', get_bytes = True)
if not desc_content:
raise stem.DescriptorUnavailable('Descriptor information is unavailable, tor might still be downloading it')
More information about the tor-commits
mailing list