mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-20 07:14:20 +01:00
Change exception formatting inside error .add_listener in BfxWebsocketClient.
This commit is contained in:
@@ -33,7 +33,9 @@ class BfxWebsocketClient(object):
|
|||||||
def __init__(self, host, buckets=5, log_level = "ERROR", API_KEY=None, API_SECRET=None, filter=None):
|
def __init__(self, host, buckets=5, log_level = "ERROR", API_KEY=None, API_SECRET=None, filter=None):
|
||||||
self.host, self.websocket, self.event_emitter = host, None, AsyncIOEventEmitter()
|
self.host, self.websocket, self.event_emitter = host, None, AsyncIOEventEmitter()
|
||||||
|
|
||||||
self.event_emitter.add_listener("error", lambda message: self.logger.error(str(message) + "\n" + traceback.format_exc()))
|
self.event_emitter.add_listener("error",
|
||||||
|
lambda exception: self.logger.error("\n" + str().join(traceback.format_exception(type(exception), exception, exception.__traceback__))[:-1])
|
||||||
|
)
|
||||||
|
|
||||||
self.API_KEY, self.API_SECRET, self.filter, self.authentication = API_KEY, API_SECRET, filter, False
|
self.API_KEY, self.API_SECRET, self.filter, self.authentication = API_KEY, API_SECRET, filter, False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user