aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2019-07-08 14:41:12 +0100
committerGravatar jesopo2019-07-08 14:41:12 +0100
commit469c7256750ce4d508737fcb1031895b2edf60e5 (patch)
tree797490b10403039a6d002e66f51964811f29995f /src
parentclose event loop when we're done with it (request_many()) (diff)
signature
tell asyncio.gather which loop to use
Diffstat (limited to 'src')
-rw-r--r--src/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index 88edeb46..e6ed9b24 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -131,7 +131,7 @@ def request_many(urls: typing.List[str]) -> typing.Dict[str, Response]:
awaits = []
for url in urls:
awaits.append(_request(url))
- task = asyncio.gather(*awaits, return_exceptions=True)
+ task = asyncio.gather(*awaits, return_exceptions=True, loop=loop)
loop.run_until_complete(task)
loop.close()