summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_config/sphinxext.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/oslo_config/sphinxext.py b/oslo_config/sphinxext.py
index 68ceb47..fd4ef41 100644
--- a/oslo_config/sphinxext.py
+++ b/oslo_config/sphinxext.py
@@ -138,8 +138,9 @@ class ShowOptionsDirective(rst.Directive):
try:
help_text = opt.help % {'default': 'the value above'}
- except TypeError:
- # There is no mention of the default in the help string.
+ except (TypeError, KeyError):
+ # There is no mention of the default in the help string,
+ # or the string had some unknown key
help_text = opt.help
_add_indented(help_text)
_add('')