From d5253a6b0f9c41688eb2044e660504ef876dd7f4 Mon Sep 17 00:00:00 2001 From: Xavier Verges Date: Mon, 14 Oct 2019 14:09:13 +0200 Subject: [PATCH] Do not break when a dialog node's context has an empty key --- scripts/dialog_json2xml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dialog_json2xml.py b/scripts/dialog_json2xml.py index 9c2e30e..9a1b251 100644 --- a/scripts/dialog_json2xml.py +++ b/scripts/dialog_json2xml.py @@ -107,6 +107,8 @@ def convertNode(nodeJSON): else: contextXML.text = "" else: + if isinstance(nodeJSON['context'], dict): + nodeJSON['context'].pop('', 'unused value to remove ocasional "":"" from context') convertAll(nodeXML, nodeJSON, 'context') #output if 'output' in nodeJSON: