Catalogs: skip set files with missing description
This occurs for at least the A320 copilot, for example. We also log a warning in the catalog creation script
This commit is contained in:
parent
4f5fd4bea6
commit
7ad60c4471
2 changed files with 17 additions and 1 deletions
|
@ -36,7 +36,12 @@ def scan_set_file(aircraft_dir, set_file, includes):
|
|||
return None
|
||||
|
||||
variant = {}
|
||||
variant['name'] = sim_node.getValue("description", None)
|
||||
name = sim_node.getValue("description", None)
|
||||
if (name == None or len(name) == 0):
|
||||
print "Set file " + set_file + " is missing a <description>, skipping"
|
||||
return None
|
||||
|
||||
variant['name'] = name
|
||||
variant['status'] = sim_node.getValue("status", None)
|
||||
|
||||
if sim_node.hasChild('author'):
|
||||
|
|
11
catalog/testData/Aircraft/f16/f16broken-set.xml
Normal file
11
catalog/testData/Aircraft/f16/f16broken-set.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList include="f16-common.xml">
|
||||
<sim>
|
||||
<name>f16broken</name>
|
||||
<!-- <description></description> -->
|
||||
<description></description>
|
||||
<long-description>Blah blah blah</long-description>
|
||||
<variant-of>f16a</variant-of>
|
||||
</sim>
|
||||
|
||||
</PropertyList>
|
Loading…
Reference in a new issue