瀏覽代碼

Remove redundant variable

Nick Barrett 2 年之前
父節點
當前提交
304cce2659
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      mauigpapi/mqtt/conn.py

+ 1 - 2
mauigpapi/mqtt/conn.py

@@ -576,7 +576,6 @@ class AndroidMQTT:
         self._iris_snapshot_at_ms = snapshot_at_ms
         self._iris_snapshot_at_ms = snapshot_at_ms
 
 
         self.log.debug("Connecting to Instagram MQTT")
         self.log.debug("Connecting to Instagram MQTT")
-        connection_retries = 0
 
 
         async def connect_and_watch():
         async def connect_and_watch():
             await self._reconnect()
             await self._reconnect()
@@ -609,7 +608,7 @@ class AndroidMQTT:
                     elif rc == pmc.MQTT_ERR_CONN_REFUSED:
                     elif rc == pmc.MQTT_ERR_CONN_REFUSED:
                         raise MQTTNotLoggedIn("MQTT connection refused")
                         raise MQTTNotLoggedIn("MQTT connection refused")
                     elif rc == pmc.MQTT_ERR_NO_CONN:
                     elif rc == pmc.MQTT_ERR_NO_CONN:
-                        raise MQTTNotConnected(f"Connection failed {connection_retries} times")
+                        raise MQTTNotConnected("Connection failed")
                     else:
                     else:
                         err = pmc.error_string(rc)
                         err = pmc.error_string(rc)
                         self.log.error("MQTT Error: %s", err)
                         self.log.error("MQTT Error: %s", err)