mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 13:20:20 +01:00
build/docs: fix generated XML syntax in tools/generate-docs-nm-settings-docs-gir.py
Class description may contains double quotes which is not valid as XML attribute value. [thaller@redhat.com: adjust original patch to reformat code with python black] [thaller@redhat.com: adjusted patch during backport from nm-1-26 to nm-1-24] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/620 (cherry picked from commit54e25f23f5) (cherry picked from commit7d26773138) (cherry picked from commit2899343bfd)
This commit is contained in:
parent
aef7a0a65d
commit
dc0c31bc6b
1 changed files with 8 additions and 1 deletions
|
|
@ -218,7 +218,14 @@ for settingxml in settings:
|
|||
class_desc = get_docs(settingxml)
|
||||
if class_desc is None:
|
||||
raise Exception("%s needs a gtk-doc block with one-line description" % setting.props.name)
|
||||
outfile.write(" <setting name=\"%s\" description=\"%s\" name_upper=\"%s\" >\n" % (setting.props.name, class_desc, get_setting_name_define (settingxml)))
|
||||
outfile.write(
|
||||
' <setting name="%s" description=%s name_upper="%s" >\n'
|
||||
% (
|
||||
setting.props.name,
|
||||
xml_quoteattr(class_desc),
|
||||
get_setting_name_define(settingxml),
|
||||
)
|
||||
)
|
||||
|
||||
setting_properties = { prop.name: prop for prop in GObject.list_properties(setting) if prop.name != 'name' }
|
||||
if args.overrides is None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue