diff --git a/CHANGELOG b/CHANGELOG index 351bdaa..748b42a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +1.3.1 +-) Handle exception of asyncio.get_event_loop() | Related to v1.2.8 + 1.3.0 -) Adjusted get_trades() to allow symbol to be None and get trades for all symbols diff --git a/bfxapi/version.py b/bfxapi/version.py index e4840b6..880ed5d 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '1.3.0' +__version__ = '1.3.1' diff --git a/bfxapi/websockets/generic_websocket.py b/bfxapi/websockets/generic_websocket.py index dcb39a8..d615754 100644 --- a/bfxapi/websockets/generic_websocket.py +++ b/bfxapi/websockets/generic_websocket.py @@ -84,7 +84,10 @@ class GenericWebsocket: thread and connection. """ self._start_new_socket() - event_loop = asyncio.get_event_loop() + try: + event_loop = asyncio.get_event_loop() + except Exception: + event_loop = None if not event_loop or not event_loop.is_running(): while True: time.sleep(1) diff --git a/setup.py b/setup.py index a5227e7..2098d8e 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from os import path here = path.abspath(path.dirname(__file__)) setup( name='bitfinex-api-py', - version='1.3.0', + version='1.3.1', description='Official Bitfinex Python API', long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction', long_description_content_type='text/markdown',