From 2bca2c199e276e5e679613c6314b531605aa7254 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 15 Dec 2020 23:39:42 -0300 Subject: Modify websocket core because SSLSocket does not exist in Android. So it must return False in a try:except loop --- game/python-extra/websock/_core.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'game') diff --git a/game/python-extra/websock/_core.py b/game/python-extra/websock/_core.py index 418aafc..6442188 100644 --- a/game/python-extra/websock/_core.py +++ b/game/python-extra/websock/_core.py @@ -179,7 +179,13 @@ class WebSocket(object): return None def is_ssl(self): - return isinstance(self.sock, ssl.SSLSocket) + ########################## + # THIS HAS BEEN MODIFIED # + ########################## + try: + return isinstance(self.sock, ssl.SSLSocket) + except: + return False headers = property(getheaders) -- cgit v1.2.3-70-g09d2