Commit d505bc48 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix doc bug introduced in 12637df5

Commit 12637df5

 changed/generalised how we build fields in the sphinx
extension, however it resulted in this uncaught-so-far result:

$ echo @QUERY_FIELDS_GROUP@ | ./autotools/docpp
<generator object BuildValuesDoc at 0x28fd370>

There's no point in yield-ing a single value (as opposed to a stream
of values), so let's just "return" it.

By the way, there's no test for this kind of error, but I don't think
it would happen too often, so I didn't add one (e.g. grep "<.* at
0x[0-9a-f]+>" man/*.[178]).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent bdd6931c
#
#
# Copyright (C) 2011 Google Inc.
# Copyright (C) 2011, 2012 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -294,7 +294,7 @@ def BuildQueryFields(fields):
defs = [(fdef.name, fdef.doc)
for (_, (fdef, _, _, _)) in utils.NiceSort(fields.items(),
key=compat.fst)]
yield BuildValuesDoc(defs)
return BuildValuesDoc(defs)
def BuildValuesDoc(values):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment