Skip to content

Commit

Permalink
ammends to the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamedemad4 committed Sep 6, 2020
1 parent febcd8a commit 111dcb0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tiingo/wsclient.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import os
import websocket
import thread
try:
import thread
except ImportError:
import _thread as thread
import time
import json
from exceptions import MissingRequiredArgument
from tiingo.exceptions import MissingRequiredArgumentError

GLOB_config=None
GLOB_on_msg_cb=None
Expand Down Expand Up @@ -93,7 +96,7 @@ def __init__(self,config={},endpoint=None,on_msg_cb=None):

self.on_msg_cb = on_msg_cb
if not self.on_msg_cb:
raise MissingRequiredArgument("please define on_msg_cb It's a callback that gets called when new messages arrive "
raise MissingRequiredArgumentError("please define on_msg_cb It's a callback that gets called when new messages arrive "
"Example:"
"def cb_fn(msg):"
" print(msg)")
Expand All @@ -108,5 +111,4 @@ def __init__(self,config={},endpoint=None,on_msg_cb=None):
on_error = genericWebsocketClient.on_error,
on_close = genericWebsocketClient.on_close,
on_open = genericWebsocketClient.on_open)
ws.run_forever()

ws.run_forever()

0 comments on commit 111dcb0

Please sign in to comment.