diff options
author | Doug Hellmann <doug@doughellmann.com> | 2017-07-28 13:37:12 -0400 |
---|---|---|
committer | Lance Bragstad <lbragstad@gmail.com> | 2017-07-31 16:25:38 +0000 |
commit | 4b2342a9fe71ca47282b302372df594157c5da2f (patch) | |
tree | ebf25a80a0659201060fc782e18f5677e40d38ab /oslo_policy/sphinxext.py | |
parent | 2b99c39c30df432fe79cbfe3db0f21039e324fb4 (diff) | |
download | oslo-policy-4b2342a9fe71ca47282b302372df594157c5da2f.tar.gz |
throw an exception when sphinxext cannot find the config file
Using the app error function is not enough to break the build at the
point where the error occurs. Throw an exception with an error message
explaining the problem.
Related-Bug: 1707246
Change-Id: Ie836b7a6f3ea7cba1737913b944f36c77f14cfd0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Diffstat (limited to 'oslo_policy/sphinxext.py')
-rw-r--r-- | oslo_policy/sphinxext.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oslo_policy/sphinxext.py b/oslo_policy/sphinxext.py index dcb8471..00b90c8 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) |