From 8e1814a8aca0f72186c5a2646a1324f356502a9b Mon Sep 17 00:00:00 2001 From: David Date: Tue, 23 Jan 2024 14:20:58 +0800 Subject: [PATCH] Update clients.py --- wsstat/clients.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wsstat/clients.py b/wsstat/clients.py index f09aec9..ed59c24 100644 --- a/wsstat/clients.py +++ b/wsstat/clients.py @@ -11,7 +11,10 @@ import urwid import websockets -import websockets.handshake +try: + import websockets.handshake +except ImportError: + import websockets.legacy.handshake from collections import OrderedDict, deque from websockets.protocol import State