mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-11 00:58:39 +03:00
Sample reformatting
This commit is contained in:
parent
4646e221c0
commit
1a7e7b9cd3
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user