diff options
Diffstat (limited to 'scripts/qapi2texi.py')
-rwxr-xr-x | scripts/qapi2texi.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py index 0f3e5738c8..0aaf45c98c 100755 --- a/scripts/qapi2texi.py +++ b/scripts/qapi2texi.py @@ -136,7 +136,7 @@ def texi_body(doc): for arg, section in doc.args.iteritems(): desc = str(section) opt = '' - if "#optional" in desc: + if section.optional: desc = re.sub(r'^ *#optional *\n?|\n? *#optional *$|#optional', '', desc) opt = ' (optional)' @@ -185,7 +185,7 @@ def texi_enum(expr, doc): """Format an enum to texi""" for i in expr['data']: if i not in doc.args: - doc.args[i] = '' + doc.args[i] = qapi.QAPIDoc.ArgSection(i) body = texi_body(doc) return TYPE_FMT(type="Enum", name=doc.symbol, |