1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-11 00:58:39 +03:00

Sample reformatting

This commit is contained in:
Adolfo Gómez García 2023-06-09 02:51:30 +02:00
parent 4646e221c0
commit 1a7e7b9cd3
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -75,12 +75,14 @@ async def login(session: aiohttp.ClientSession) -> None:
# Fix user agent, so we indicate we are on Linux
session.headers.update({'User-Agent': 'SampleClient/1.0 (Linux)'})
async def logout(session: aiohttp.ClientSession) -> None:
response = await session.get(REST_URL + 'auth/logout')
if not response.ok:
raise LogoutException('Error logging out')
async def list_services(
session: aiohttp.ClientSession,
) -> typing.List[typing.MutableMapping[str, typing.Any]]:
@ -133,6 +135,7 @@ async def main():
await logout(session)
if __name__ == "__main__":
loop = asyncio.new_event_loop()
loop.run_until_complete(main())