diff --git a/oslo_config/cfg.py b/oslo_config/cfg.py index b436f8a7..cbffb1e1 100644 --- a/oslo_config/cfg.py +++ b/oslo_config/cfg.py @@ -3196,7 +3196,7 @@ class ConfigOpts(abc.Mapping): except ValueError: sys.stderr.write("argument --%s: Invalid %s value: %s\n" % ( opt.dest, repr(opt.type), value)) - raise SystemExit + raise SystemExit(1) def _reload_config_files(self): namespace = self._parse_config_files() diff --git a/oslo_config/generator.py b/oslo_config/generator.py index ea12a922..8f8f85e5 100644 --- a/oslo_config/generator.py +++ b/oslo_config/generator.py @@ -826,7 +826,7 @@ def main(args=None): except cfg.RequiredOptError: conf.print_help() if not sys.argv[1:]: - raise SystemExit + raise SystemExit(1) raise generate(conf) diff --git a/oslo_config/validator.py b/oslo_config/validator.py index 01725547..4ec1a7e3 100644 --- a/oslo_config/validator.py +++ b/oslo_config/validator.py @@ -227,7 +227,7 @@ def main(): except cfg.RequiredOptError: conf.print_help() if not sys.argv[1:]: - raise SystemExit + raise SystemExit(1) raise return _validate(conf)