[libvirt] [PATCH 1/7] docs: don't write out empty info attributes for function arguments

Eric Blake eblake at redhat.com
Tue Jan 29 00:36:08 UTC 2013


On 01/22/2013 07:31 AM, Claudio Bley wrote:
> 
> Signed-off-by: Claudio Bley <cbley at av-test.de>
> ---
>  docs/apibuild.py |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/apibuild.py b/docs/apibuild.py
> index 9a29c42..f9500b1 100755
> --- a/docs/apibuild.py
> +++ b/docs/apibuild.py
> @@ -2183,8 +2183,8 @@ class docBuilder:
>              output.write("      <info><![CDATA[%s]]></info>\n" % (desc))
>              self.indexString(name, desc)
>              if ret[0] != None:
> -                if ret[0] == "void":
> -                    output.write("      <return type='void'/>\n")
> +                if ret[0] == "void" or ret[1] == None or ret[1] == '':
> +                    output.write("      <return type='%s'/>\n" % ret[0])

Can we instead make it a fatal error if ret[1] == None or ret[1] == '',
to force 'make' to fail and point out the missing documentation?

>                  else:
>                      output.write("      <return type='%s' info='%s'/>\n" % (
>                               ret[0], escape(ret[1])))
> @@ -2192,8 +2192,8 @@ class docBuilder:
>              for param in params:
>                  if param[0] == 'void':
>                      continue
> -                if param[2] == None:
> -                    output.write("      <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
> +                if param[2] == None or param[2] == '':
> +                    output.write("      <arg name='%s' type='%s' />\n" % (param[1], param[0]))
>                  else:
>                      output.write("      <arg name='%s' type='%s' info='%s'/>\n" % (param[1], param[0], escape(param[2])))
>                      self.indexString(name, param[2])
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130128/4debeda3/attachment-0001.sig>


More information about the libvir-list mailing list