From 295f403c64f730b5f05b1b363fd33198f85ff6e5 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 25 Jul 2021 11:17:07 +0200 Subject: [PATCH] Websocket Fix AttributeError: 'NoneType' object has no attribute is_ssl --- resources/lib/websocket/_core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/websocket/_core.py b/resources/lib/websocket/_core.py index 1ff80f05..7934cc15 100644 --- a/resources/lib/websocket/_core.py +++ b/resources/lib/websocket/_core.py @@ -197,7 +197,10 @@ class WebSocket(object): return None def is_ssl(self): - return isinstance(self.sock, ssl.SSLSocket) + try: + return isinstance(self.sock, ssl.SSLSocket) + except: + return False headers = property(getheaders)