From 940542f8562e2cb4e6ca183341659f18bbdfd180 Mon Sep 17 00:00:00 2001 From: Geoff Whittington Date: Mon, 22 Aug 2022 00:19:30 -0400 Subject: [PATCH] Try to make a dict --- plugins.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins.py b/plugins.py index 9b9f12d..aef36a4 100644 --- a/plugins.py +++ b/plugins.py @@ -305,8 +305,11 @@ class SendPlugin(Plugin): def do_action(self, packet): if type(packet) is not dict: - self.logger.error(f"Packet is not dict") - return packet + try: + packet = json.loads(packet) + except: + self.logger.error("Packet is not a dict") + return packet if self.config["device"] not in self.devices: self.logger.error(f"Missing interface for device {self.config['device']}")