Skip to content

Commit

Permalink
Fix incomplete switch to policy.yaml
Browse files Browse the repository at this point in the history
Commit 0d610f6 was supposed to switch
default policy file from policy.json to policy.yaml but that change
was incomplete and still the old policy.json is searched first.

This change fixes it and ensures policy.yaml is loaded first.
  • Loading branch information
kajinamit committed Sep 4, 2022
1 parent 39d4f86 commit 87ef6cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gnocchi/cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def prepare_service(conf=None):
conf = cfg.ConfigOpts()

opts.set_defaults()
policy_opts.set_defaults(conf)
policy_opts.set_defaults(conf, 'policy.yaml')
conf = service.prepare_service(conf=conf)
cfg_path = conf.oslo_policy.policy_file
if not os.path.isabs(cfg_path):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ install_requires =
numpy>=1.9.0
iso8601
oslo.config>=3.22.0
oslo.policy>=3.5.0
oslo.policy>=3.11.0
oslo.middleware>=3.22.0
pytimeparse
pecan>=0.9
Expand Down

0 comments on commit 87ef6cd

Please sign in to comment.