Skip to content

Commit

Permalink
removed config as a default arg;added comment to explain why on_error…
Browse files Browse the repository at this point in the history
…() and on_close() don't get a self
  • Loading branch information
Mohamedemad4 committed Oct 6, 2020
1 parent 716a5b6 commit f157b0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tiingo/wsclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def cb_fn(msg):
while True:pass
'''

def __init__(self,config={},endpoint=None,on_msg_cb=None):
def __init__(self,config,endpoint=None,on_msg_cb=None):

self._base_url = "wss://api.tiingo.com"
self.config=config
Expand Down Expand Up @@ -88,6 +88,7 @@ def on_msg_cb_local(ws,msg):
return
return on_msg_cb_local

# since methods need to be unbound in order for websocketClient these methods don't have a self as their first parameter
def on_error(ws, error):
print(error)

Expand Down

0 comments on commit f157b0c

Please sign in to comment.