mirror of
https://github.com/geoffwhittington/meshtastic-bridge.git
synced 2026-07-13 13:10:56 +02:00
Try to make a dict
This commit is contained in:
+5
-2
@@ -305,8 +305,11 @@ class SendPlugin(Plugin):
|
|||||||
def do_action(self, packet):
|
def do_action(self, packet):
|
||||||
|
|
||||||
if type(packet) is not dict:
|
if type(packet) is not dict:
|
||||||
self.logger.error(f"Packet is not dict")
|
try:
|
||||||
return packet
|
packet = json.loads(packet)
|
||||||
|
except:
|
||||||
|
self.logger.error("Packet is not a dict")
|
||||||
|
return packet
|
||||||
|
|
||||||
if self.config["device"] not in self.devices:
|
if self.config["device"] not in self.devices:
|
||||||
self.logger.error(f"Missing interface for device {self.config['device']}")
|
self.logger.error(f"Missing interface for device {self.config['device']}")
|
||||||
|
|||||||
Reference in New Issue
Block a user