add missing await

This commit is contained in:
HgO 2022-07-09 00:02:34 +02:00
parent 7fd57034dc
commit 6b8a2f64f8
3 changed files with 1 additions and 13 deletions

View file

@ -21,12 +21,6 @@ class AlertmanagerClient:
self.cache = cache
self.session = aiohttp.ClientSession()
async def __aenter__(self) -> AlertmanagerClient:
return self
async def __aexit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
await self.close()
async def close(self) -> None:
await self.session.close()

View file

@ -97,7 +97,7 @@ async def start_matrix_client(
# Sleep so we don't bombard the server with login requests
await asyncio.sleep(15)
finally:
client.close()
await client.close()
def main() -> None:

View file

@ -64,12 +64,6 @@ class Webhook:
self.port = config.port
self.socket = config.socket
async def __aenter__(self) -> Webhook:
return self
async def __aexit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
await self.close()
async def start(self) -> None:
await self.runner.setup()