diff options
author | Pierre Riteau <pierre@stackhpc.com> | 2022-05-25 11:04:33 +0200 |
---|---|---|
committer | Pierre Riteau <pierre@stackhpc.com> | 2022-05-25 11:04:33 +0200 |
commit | 5bd767be790f21d6ec0af0589f50137b207d94e8 (patch) | |
tree | 2dff7ae388d79d78c5d9c98c9dec59a6a4736da8 /oslo_policy | |
parent | 6471443811c300a8a9c99d2785258765b4461148 (diff) | |
download | oslo-policy-5bd767be790f21d6ec0af0589f50137b207d94e8.tar.gz |
Fix generation of sample policy files4.0.0
Generation of sample policy files was broken when exclude_deprecated was
added as an extra argument to the generate_sample function in
I6d02eb4d8f94323a806fab991ba2f1c3bbf71d04. It was passed as the fourth
argument, which is actually include_help. Because it defaults to False,
this turned sample policy files into actual policy files.
Fix by using keyword arguments instead.
Change-Id: I5478b1c8e7fd2f1b01f63602998194bab3683f7c
Closes-Bug: #1975682
Diffstat (limited to 'oslo_policy')
-rw-r--r-- | oslo_policy/generator.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/oslo_policy/generator.py b/oslo_policy/generator.py index deedcd7..84a19b8 100644 --- a/oslo_policy/generator.py +++ b/oslo_policy/generator.py @@ -545,8 +545,9 @@ def generate_sample(args=None, conf=None): conf.register_opts(GENERATOR_OPTS + RULE_OPTS) conf(args) _check_for_namespace_opt(conf) - _generate_sample(conf.namespace, conf.output_file, conf.format, - conf.exclude_deprecated) + _generate_sample(conf.namespace, output_file=conf.output_file, + output_format=conf.format, + exclude_deprecated=conf.exclude_deprecated) def generate_policy(args=None): |