tools: don't set empty attributes in "generate-docs-nm-property-infos.py"

If the information is missing, the entire attribute should not be there.
Don't set it to the empty word.

Also, don't alias the "variable" attribute to the "name". It's not clear
what the "variable" fields is supposed to mean, but if it's not
explicitly set, don't make up the information. If a user of that
information cares, the can always fallback to the "name".
This commit is contained in:
Thomas Haller 2022-10-04 10:16:07 +02:00
parent e56f7f5c2d
commit c1bebdfaa6
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -132,12 +132,7 @@ def write_data(tag, setting_node, line_no, parsed_data):
v = parsed_data.get(k, None)
if v is None:
if k == "variable":
v = name
elif k == 'description-docbook':
continue
else:
v = ""
continue
if xmltype == KEYWORD_XML_TYPE_NESTED:
# Set as XML nodes. The input data is XML itself.