fixed #130
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user