commit 728234041e968c871eac3b5c58e7dc5cc5869506 Author: Illia Volochii illia.volochii@gmail.com Date: Fri Apr 17 19:51:46 2020 +0300
Make `Controller.get_server_descriptors` asynchronous --- stem/control.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/control.py b/stem/control.py index 6ccf2262..4469e9c5 100644 --- a/stem/control.py +++ b/stem/control.py @@ -1875,7 +1875,7 @@ class Controller(BaseController): return stem.descriptor.server_descriptor.RelayDescriptor(desc_content)
@with_default(yields = True) - def get_server_descriptors(self, default: Any = UNDEFINED) -> Iterator[stem.descriptor.server_descriptor.RelayDescriptor]: + async def get_server_descriptors(self, default: Any = UNDEFINED) -> Iterator[stem.descriptor.server_descriptor.RelayDescriptor]: """ get_server_descriptors(default = UNDEFINED)
@@ -1902,7 +1902,7 @@ class Controller(BaseController): # # https://trac.torproject.org/8248
- desc_content = self.get_info('desc/all-recent', get_bytes = True) + desc_content = await self.get_info('desc/all-recent', get_bytes = True)
if not desc_content: raise stem.DescriptorUnavailable('Descriptor information is unavailable, tor might still be downloading it')
tor-commits@lists.torproject.org