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:
|
except ValueError:
|
||||||
sys.stderr.write("argument --%s: Invalid %s value: %s\n" % (
|
sys.stderr.write("argument --%s: Invalid %s value: %s\n" % (
|
||||||
opt.dest, repr(opt.type), value))
|
opt.dest, repr(opt.type), value))
|
||||||
raise SystemExit
|
raise SystemExit(1)
|
||||||
|
|
||||||
def _reload_config_files(self):
|
def _reload_config_files(self):
|
||||||
namespace = self._parse_config_files()
|
namespace = self._parse_config_files()
|
||||||
|
@ -826,7 +826,7 @@ def main(args=None):
|
|||||||
except cfg.RequiredOptError:
|
except cfg.RequiredOptError:
|
||||||
conf.print_help()
|
conf.print_help()
|
||||||
if not sys.argv[1:]:
|
if not sys.argv[1:]:
|
||||||
raise SystemExit
|
raise SystemExit(1)
|
||||||
raise
|
raise
|
||||||
generate(conf)
|
generate(conf)
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ def main():
|
|||||||
except cfg.RequiredOptError:
|
except cfg.RequiredOptError:
|
||||||
conf.print_help()
|
conf.print_help()
|
||||||
if not sys.argv[1:]:
|
if not sys.argv[1:]:
|
||||||
raise SystemExit
|
raise SystemExit(1)
|
||||||
raise
|
raise
|
||||||
return _validate(conf)
|
return _validate(conf)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user