From e43ba45f2fc808b76c12f511390528cf1148a5f3 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sun, 16 Nov 2014 17:07:56 -0500 Subject: cli, libnm: don't use D-Bus-specific documentation in nmcli Now that nm-setting-docs.xml is more D-Bus-specific, it's less appropriate for nmcli's internal documentation. So generate a second copy of the docs without using the overrides file, and use that one for nmcli's documentation. --- libnm/generate-setting-docs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libnm/generate-setting-docs.py') diff --git a/libnm/generate-setting-docs.py b/libnm/generate-setting-docs.py index a47794715a..1d99b8621a 100755 --- a/libnm/generate-setting-docs.py +++ b/libnm/generate-setting-docs.py @@ -173,7 +173,8 @@ settings = sorted(settings, key=lambda setting: setting.attrib['{%s}symbol-prefi init_constants(girxml, settings) -overrides = ET.parse(args.overrides).getroot() +if args.overrides is not None: + overrides = ET.parse(args.overrides).getroot() outfile.write(""" \n" % setting.props.name) setting_properties = { prop.name: prop for prop in GObject.list_properties(setting) } - setting_overrides = { override.attrib['name']: override for override in overrides.findall('./setting[@name="%s"]/property' % setting.props.name) } + if args.overrides is None: + setting_overrides = {} + else: + setting_overrides = { override.attrib['name']: override for override in overrides.findall('./setting[@name="%s"]/property' % setting.props.name) } properties = sorted(set.union(set(setting_properties.keys()), set(setting_overrides.keys()))) -- cgit v1.2.1