diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-08-01 07:01:12 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-08-01 07:01:12 +0000 |
commit | 94c7504b11113365d28c7f7cff1d6bd6d315e588 (patch) | |
tree | c33e123be91f70c0765a127604884e993e3a7a9d | |
parent | 3cbcaad8a44f913aea4b31aa3184410b0b227868 (diff) | |
parent | 45cd69557df98f8ccc581be0e6eaab3954310aaf (diff) | |
download | oslo-policy-94c7504b11113365d28c7f7cff1d6bd6d315e588.tar.gz |
Merge "fix formatting for empty defaults" into stable/pike1.25.1
-rw-r--r-- | oslo_policy/sphinxext.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/oslo_policy/sphinxext.py b/oslo_policy/sphinxext.py index 7e92f03..00b90c8 100644 --- a/oslo_policy/sphinxext.py +++ b/oslo_policy/sphinxext.py @@ -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:') |