From 97e75dae0c4e75fa35fed1fb3407a429f7bfe537 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 31 Dec 2017 12:16:23 +0100 Subject: Support setting optional 'type' node in command templates other than 'txt' --- scripts/build-command-templates | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-command-templates b/scripts/build-command-templates index ff0ce05f0..d1871c1c8 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -165,6 +165,12 @@ def get_properties(p): except: pass + # Get type + try: + props["type"] = p.find("type").text + except: + pass + # Get "multi" if p.find("multi") is not None: props["multi"] = True @@ -233,7 +239,8 @@ def process_node(n, tmpl_dir): props["owner"] = owner # Type should not be set for non-tag, non-leaf nodes if node_type != "node": - props["type"] = "txt" + if "type" not in props.keys(): + props["type"] = "txt" if node_type == "tagNode": props["tag"] = "True" -- cgit v1.2.3