]> git.ipfire.org Git - ipfire.org.git/commitdiff
asterisk: Check if we have received an Event before accessing it
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Jun 2023 16:42:36 +0000 (16:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Jun 2023 16:42:36 +0000 (16:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/asterisk.py

index 2ea954f46d68e4355363427ce5a25790d7994c27..720cd791ceba193b50e952ef90b93830b33ed1f2 100644 (file)
@@ -66,7 +66,7 @@ class Asterisk(misc.Object):
 
                # Run the action and parse all messages
                for data in await self.manager.send_action(args):
-                       if not data.Event == cls.event:
+                       if not "Event" in data or not data.Event == cls.event:
                                continue
 
                        # Create the object and append it to the list