diff --git a/oslo_policy/sphinxext.py b/oslo_policy/sphinxext.py index dcb84710..00b90c8f 100644 --- a/oslo_policy/sphinxext.py +++ b/oslo_policy/sphinxext.py @@ -124,7 +124,9 @@ class ShowPolicyDirective(rst.Directive): config_path = c break else: - self.error('could not find config file in: %s' % str(candidates)) + raise ValueError( + 'could not find config file in: %s' % str(candidates) + ) self.info('loading config file %s' % config_path)