This commit is contained in:
liris
2014-11-20 14:08:24 +09:00
parent 9fed857c02
commit 3ddf80c019

View File

@@ -2,7 +2,7 @@ import websocket
try:
import thread
except ImportError: #TODO use Threading instead of _thread in python3
import _thread
import _thread as thread
import time
import sys
@@ -32,11 +32,7 @@ def on_open(ws):
ws.close()
print("Thread terminating...")
try:
thread.start_new_thread(run, ())
except:
_thread.start_new_thread(run, ())
if __name__ == "__main__":
websocket.enableTrace(True)