mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02: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)
This commit is contained in:
parent
5c50280bc6
commit
2899343bfd
1 changed files with 8 additions and 1 deletions
|
|
@ -218,7 +218,14 @@ for settingxml in settings:
|
||||||
class_desc = get_docs(settingxml)
|
class_desc = get_docs(settingxml)
|
||||||
if class_desc is None:
|
if class_desc is None:
|
||||||
raise Exception("%s needs a gtk-doc block with one-line description" % setting.props.name)
|
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' }
|
setting_properties = { prop.name: prop for prop in GObject.list_properties(setting) if prop.name != 'name' }
|
||||||
if args.overrides is None:
|
if args.overrides is None:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue