Skip to content

Commit 8f6753f

Browse files
committed
mqtt tweak
1 parent affb666 commit 8f6753f

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

dashio/mqtt_connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
import threading
3030
import time
3131

32-
import paho.mqtt.client as mqtt
33-
import shortuuid
34-
import zmq
32+
import paho.mqtt.client as mqtt # type: ignore
33+
import shortuuid # type: ignore
34+
import zmq # type: ignore
3535
from socket import gaierror
3636
from .constants import CONNECTION_PUB_URL
3737

dashio/sim767x.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from typing import Any, Callable
3131
import textwrap
3232
import threading
33-
import serial
33+
import serial # type: ignore
3434

3535
from .schedular import Schedular
3636

@@ -280,7 +280,7 @@ def subscribe(self, topic: str):
280280
self._sub_topic = topic
281281

282282
def publish_message(self, topic: str, message: str):
283-
"""Publis a message"""
283+
"""Publish a message"""
284284
with self._messages_dict_lock:
285285
if topic not in self._messages_dict:
286286
self._messages_dict[topic] = message
@@ -434,10 +434,9 @@ def _process_at_commands(self):
434434
result_arr = result_str.split(',')
435435
if len(result_arr) >= 2:
436436
if result_arr[0] == "1": # pdp context 0
437-
if result_arr[0] == "1":
438-
self._check_MQTT_client()
439-
else:
440-
self._start_pdp_context()
437+
self._check_MQTT_client()
438+
else:
439+
self._start_pdp_context()
441440
# MQTT
442441
elif data.startswith("+CMQTTACCQ:"):
443442
result_arr = result_str.split(',')

0 commit comments

Comments
 (0)