Skip to content

Commit

Permalink
Merge pull request #7009 from eric-wieser/patch-2
Browse files Browse the repository at this point in the history
Emit a better error if no feature flag is found
  • Loading branch information
stsewd authored May 4, 2020
2 parents d7e86b3 + ca0567a commit 6394d6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/doc_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def feature_flags_role(typ, rawtext, text, lineno, inliner, options=None,
requested_feature = utils.unescape(text)
for feature in all_features:
if requested_feature.lower() == feature[0].lower():
desc = nodes.Text(feature[1], feature[1])
return [desc], []
return [nodes.Text(feature[1], feature[1])], []
raise ValueError(
"Unknown feature flag {!r}".format(requested_feature))


def setup(_):
Expand Down

0 comments on commit 6394d6d

Please sign in to comment.