Skip to content

Commit fa614ab

Browse files
committed
1 parent 156f617 commit fa614ab

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

bitsharesapi/bitsharesnoderpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22
from grapheneapi.api import Api as Original_Api
33
from bitsharesbase.chains import known_chains
4-
from . import exceptions
4+
from . import exceptions
55

66

77
class Api(Original_Api):

bitsharesapi/websocket.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def __init__(
154154
def cancel_subscriptions(self):
155155
self.cancel_all_subscriptions()
156156

157-
def on_open(self, ws=None):
157+
def on_open(self, *args, **kwargs):
158158
""" This method will be called once the websocket connection is
159159
established. It will
160160
@@ -233,7 +233,7 @@ def process_notice(self, notice):
233233
# Treat account updates separately
234234
self.on_account(notice)
235235

236-
def on_message(self, ws, reply, *args):
236+
def on_message(self, reply, *args, **kwargs):
237237
""" This method is called by the websocket connection on every
238238
message that is received. If we receive a ``notice``, we
239239
hand over post-processing and signalling of events to
@@ -278,17 +278,17 @@ def on_message(self, ws, reply, *args):
278278
log.critical("Error in {}: {}\n\n{}".format(
279279
callbackname, str(e), traceback.format_exc()))
280280

281-
def on_error(self, ws, error):
281+
def on_error(self, error, *args, **kwargs):
282282
""" Called on websocket errors
283283
"""
284284
log.exception(error)
285285

286-
def on_close(self, ws):
286+
def on_close(self, *args, **kwargs):
287287
""" Called when websocket connection is closed
288288
"""
289289
log.debug('Closing WebSocket connection with {}'.format(self.url))
290290

291-
def run_forever(self):
291+
def run_forever(self, *args, **kwargs):
292292
""" This method is used to run the websocket app continuously.
293293
It will execute callbacks as defined and try to stay
294294
connected with the provided APIs
@@ -328,7 +328,7 @@ def run_forever(self):
328328
except Exception as e:
329329
log.critical("{}\n\n{}".format(str(e), traceback.format_exc()))
330330

331-
def close(self):
331+
def close(self, *args, **kwargs):
332332
""" Closes the websocket connection and waits for the ping thread to close
333333
"""
334334
self.run_event.set()

0 commit comments

Comments
 (0)