- Print exception on first failed connection

This commit is contained in:
trigg 2020-09-26 20:06:13 +01:00
parent e08e6bc62c
commit 338cb63c51

View file

@ -1027,13 +1027,16 @@ def close(a=None, b=None, c=None):
Gtk.main_quit()
def connect():
global ws, oauth_token
global ws, oauth_token, error_connection
if ws:
return
try:
ws = websocket.create_connection("ws://127.0.0.1:6463/?v=1&client_id=%s" % (oauth_token),
origin="https://streamkit.discord.com")
except:
except Exception as e:
if error_connection:
print(e)
error_connection=False
pass
def main():
@ -1059,4 +1062,5 @@ if __name__ == "__main__":
ind=None
menu=None
warn_connection=True
error_connection=True
main()