File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929import threading
3030import 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
3535from socket import gaierror
3636from .constants import CONNECTION_PUB_URL
3737
Original file line number Diff line number Diff line change 3030from typing import Any , Callable
3131import textwrap
3232import threading
33- import serial
33+ import serial # type: ignore
3434
3535from .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 (',' )
You can’t perform that action at this time.
0 commit comments