diff options
Diffstat (limited to 'oslo_policy/sphinxpolicygen.py')
-rw-r--r-- | oslo_policy/sphinxpolicygen.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/oslo_policy/sphinxpolicygen.py b/oslo_policy/sphinxpolicygen.py index 3987d04..8dd3009 100644 --- a/oslo_policy/sphinxpolicygen.py +++ b/oslo_policy/sphinxpolicygen.py @@ -85,10 +85,12 @@ def _generate_sample(app, policy_file, base_name, exclude_deprecated): # in their documented modules. It's not allowed to register a cli arg after # the args have been parsed once. conf = cfg.ConfigOpts() + arguments = ['--config-file', config_path, + '--output-file', out_file] + if exclude_deprecated: + arguments += ['--exclude-deprecated'] generator.generate_sample( - args=['--config-file', config_path, - '--output-file', out_file, - '--exclude-deprecated', exclude_deprecated], + args=arguments, conf=conf) |