fix formatting for empty defaults
When the default for a policy rule is empty, the output is ````. The rst parser interprets that as a title overline or underline, and sphinx dies. When we have no default rule emit a string saying so to avoid emitting an empty literal inline block. Closes-Bug: 1707246 Change-Id: I774b2de5ff59874dfa67811c094735dd74c8083e Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
540503294c
commit
2b99c39c30
|
@ -51,7 +51,10 @@ def _format_policy_rule(rule):
|
|||
"""
|
||||
yield '``{}``'.format(rule.name)
|
||||
|
||||
yield _indent(':Default: ``{}``'.format(rule.check_str))
|
||||
if rule.check_str:
|
||||
yield _indent(':Default: ``{}``'.format(rule.check_str))
|
||||
else:
|
||||
yield _indent(':Default: <empty string>')
|
||||
|
||||
if hasattr(rule, 'operations'):
|
||||
yield _indent(':Operations:')
|
||||
|
|
Loading…
Reference in New Issue