diff --git a/setup.py b/setup.py index 083138c..b3eddb3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="teslemetry_stream", - version="0.5.1", + version="0.5.2", author="Brett Adams", author_email="hello@teslemetry.com", description="Teslemetry Streaming API library for Python", diff --git a/teslemetry_stream/stream.py b/teslemetry_stream/stream.py index f07a78a..19a55a6 100644 --- a/teslemetry_stream/stream.py +++ b/teslemetry_stream/stream.py @@ -194,7 +194,10 @@ async def listen(self): if event: for listener, filters in self._listeners.values(): if recursive_match(filters, event): - listener(event) + try: + listener(event) + except Exception as error: + LOGGER.error("Uncaught error in listener: %s", error) LOGGER.debug("Listen has finished") def recursive_match(dict1, dict2):