From d4cf2a7cf9e2594dac668ac81b160573d5916fb4 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 30 Nov 2021 15:57:28 +0100 Subject: [PATCH] fix: [sync client] fix websockets client connect for python >= 3.8 --- bin/core/ail_2_ail_client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/core/ail_2_ail_client.py b/bin/core/ail_2_ail_client.py index a1e7d300..810f93c6 100755 --- a/bin/core/ail_2_ail_client.py +++ b/bin/core/ail_2_ail_client.py @@ -54,13 +54,12 @@ async def pull(websocket, ail_uuid): sys.stdout.write(obj) async def push(websocket, ail_uuid): - ## DEBUG: + # ## DEBUG: # try: # while True: # await websocket.send('test') # await asyncio.sleep(10) # except websockets.exceptions.ConnectionClosedError as err: - # print(err.code) # raise err try: @@ -110,7 +109,7 @@ async def ail_to_ail_client(ail_uuid, sync_mode, api, ail_key=None, client_id=No client_id = ail_2_ail.create_sync_client_cache(ail_uuid, sync_mode) try: - async with websockets.client.connect( + async with websockets.connect( uri, ssl=ssl_context, #open_timeout=10, websockers 10.0 /!\ python>=3.7