From 362a791650858eea3b79e154a218630c7a4fdbea Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 17 May 2018 06:51:44 +0200 Subject: T646: prevent convertors from overwriting existing node.def files. --- scripts/build-command-templates | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts/build-command-templates') diff --git a/scripts/build-command-templates b/scripts/build-command-templates index a99f317d7..88223ea80 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -265,8 +265,13 @@ def process_node(n, tmpl_dir): props["tag"] = "True" - with open(os.path.join(make_path(my_tmpl_dir), "node.def"), "w") as f: - f.write(make_node_def(props)) + nodedef_path = os.path.join(make_path(my_tmpl_dir), "node.def") + if not os.path.exists(nodedef_path): + with open(nodedef_path, "w") as f: + f.write(make_node_def(props)) + else: + # Something has already generated that file + pass if node_type == "node": -- cgit v1.2.3