From 6e1d6f3100875587cf7b829e7174b8a09e4f731d Mon Sep 17 00:00:00 2001 From: Marcin Kaptur Date: Sun, 6 Nov 2022 13:47:27 +0100 Subject: [PATCH] . --- MQTTClient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MQTTClient.py b/MQTTClient.py index 114c9ce..0fe5c3c 100644 --- a/MQTTClient.py +++ b/MQTTClient.py @@ -45,8 +45,8 @@ def __init__(self, messageQ, commandQ, config) -> None: def connect (self,config) -> None: try: self._mqttConn.connect(config['mqtt_host'], port=config['mqtt_port'], keepalive=120) - except: - self.logger.error("problem with connect") + except Exception as e: + self.logger.error("problem with connect: %s" % e) def close(self) -> None: self.logger.info("Closing connection") self._mqttConn.disconnect()