From 60341437889479bc348babd3bd1c16161eb783f9 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 27 Nov 2017 17:59:37 +0000 Subject: [PATCH] Catalogs:-set.xml files cam exclude themselves Re-add the old feature, that -set.xml files can explicitly opt-out of being included in the catalog. Useful for some development and helper / included files in some aircraft. --- catalog/catalog.py | 5 +++++ catalog/testData/Aircraft/f16/f16-excluded-set.xml | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 catalog/testData/Aircraft/f16/f16-excluded-set.xml diff --git a/catalog/catalog.py b/catalog/catalog.py index ca54010..777520d 100644 --- a/catalog/catalog.py +++ b/catalog/catalog.py @@ -35,6 +35,11 @@ def scan_set_file(aircraft_dir, set_file, includes): if sim_node == None: return None + # allow -set.xml files to specifcially exclude themselves from + # the creation process, by setting true + if (sim_node.getValue("exclude-from-catalog", False) == True): + return None + variant = {} name = sim_node.getValue("description", None) if (name == None or len(name) == 0): diff --git a/catalog/testData/Aircraft/f16/f16-excluded-set.xml b/catalog/testData/Aircraft/f16/f16-excluded-set.xml new file mode 100644 index 0000000..62b1413 --- /dev/null +++ b/catalog/testData/Aircraft/f16/f16-excluded-set.xml @@ -0,0 +1,11 @@ + + + + true + f16-excluded + Fine + Blah blah blah + f16a + + +