diff options
Diffstat (limited to 'oslo_config/generator.py')
-rw-r--r-- | oslo_config/generator.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/oslo_config/generator.py b/oslo_config/generator.py index a081d1b..4964ca9 100644 --- a/oslo_config/generator.py +++ b/oslo_config/generator.py @@ -748,7 +748,13 @@ def main(args=None): logging.basicConfig(level=logging.WARN) conf = cfg.ConfigOpts() register_cli_opts(conf) - conf(args, version=version) + try: + conf(args, version=version) + except cfg.RequiredOptError: + conf.print_help() + if not sys.argv[1:]: + raise SystemExit + raise generate(conf) |