Merge "Provide an exit code when raising SystemExit."
This commit is contained in:
commit
beb7b6ce2b
@ -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()
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user