@@ -154,7 +154,7 @@ def __init__(
154
154
def cancel_subscriptions (self ):
155
155
self .cancel_all_subscriptions ()
156
156
157
- def on_open (self , ws = None ):
157
+ def on_open (self , * args , ** kwargs ):
158
158
""" This method will be called once the websocket connection is
159
159
established. It will
160
160
@@ -233,7 +233,7 @@ def process_notice(self, notice):
233
233
# Treat account updates separately
234
234
self .on_account (notice )
235
235
236
- def on_message (self , ws , reply , * args ):
236
+ def on_message (self , reply , * args , ** kwargs ):
237
237
""" This method is called by the websocket connection on every
238
238
message that is received. If we receive a ``notice``, we
239
239
hand over post-processing and signalling of events to
@@ -278,17 +278,17 @@ def on_message(self, ws, reply, *args):
278
278
log .critical ("Error in {}: {}\n \n {}" .format (
279
279
callbackname , str (e ), traceback .format_exc ()))
280
280
281
- def on_error (self , ws , error ):
281
+ def on_error (self , error , * args , ** kwargs ):
282
282
""" Called on websocket errors
283
283
"""
284
284
log .exception (error )
285
285
286
- def on_close (self , ws ):
286
+ def on_close (self , * args , ** kwargs ):
287
287
""" Called when websocket connection is closed
288
288
"""
289
289
log .debug ('Closing WebSocket connection with {}' .format (self .url ))
290
290
291
- def run_forever (self ):
291
+ def run_forever (self , * args , ** kwargs ):
292
292
""" This method is used to run the websocket app continuously.
293
293
It will execute callbacks as defined and try to stay
294
294
connected with the provided APIs
@@ -328,7 +328,7 @@ def run_forever(self):
328
328
except Exception as e :
329
329
log .critical ("{}\n \n {}" .format (str (e ), traceback .format_exc ()))
330
330
331
- def close (self ):
331
+ def close (self , * args , ** kwargs ):
332
332
""" Closes the websocket connection and waits for the ping thread to close
333
333
"""
334
334
self .run_event .set ()
0 commit comments