diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-05-27 04:10:14 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-05-27 04:10:14 -0700 |
commit | 9597af801a0d7741f58b20a12b4546786d47ea72 (patch) | |
tree | bdc8d3d51a4ce96334ee8606bdd10bac10ea2abb | |
parent | Fix --rebuilt-binaries code to return existing_node where appropriate. (diff) | |
download | portage-idfetch-9597af801a0d7741f58b20a12b4546786d47ea72.tar.gz portage-idfetch-9597af801a0d7741f58b20a12b4546786d47ea72.tar.bz2 portage-idfetch-9597af801a0d7741f58b20a12b4546786d47ea72.zip |
Make parse_opts() bail out when not silent and an option parameter is
invalid.
-rw-r--r-- | pym/_emerge/main.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index fa2dbaa1..9e91ee9e 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -806,8 +806,8 @@ def parse_opts(tmpcmdline, silent=False): if backtrack < 0: backtrack = None if not silent: - writemsg("!!! Invalid --backtrack parameter: '%s'\n" % \ - (myoptions.backtrack,), noiselevel=-1) + parser.error("Invalid --backtrack parameter: '%s'\n" % \ + (myoptions.backtrack,)) myoptions.backtrack = backtrack @@ -824,8 +824,8 @@ def parse_opts(tmpcmdline, silent=False): if deep is not True and deep < 0: deep = None if not silent: - writemsg("!!! Invalid --deep parameter: '%s'\n" % \ - (myoptions.deep,), noiselevel=-1) + parser.error("Invalid --deep parameter: '%s'\n" % \ + (myoptions.deep,)) myoptions.deep = deep @@ -843,8 +843,8 @@ def parse_opts(tmpcmdline, silent=False): jobs < 1: jobs = None if not silent: - writemsg("!!! Invalid --jobs parameter: '%s'\n" % \ - (myoptions.jobs,), noiselevel=-1) + parser.error("Invalid --jobs parameter: '%s'\n" % \ + (myoptions.jobs,)) myoptions.jobs = jobs @@ -857,8 +857,8 @@ def parse_opts(tmpcmdline, silent=False): if load_average <= 0.0: load_average = None if not silent: - writemsg("!!! Invalid --load-average parameter: '%s'\n" % \ - (myoptions.load_average,), noiselevel=-1) + parser.error("Invalid --load-average parameter: '%s'\n" % \ + (myoptions.load_average,)) myoptions.load_average = load_average @@ -871,8 +871,8 @@ def parse_opts(tmpcmdline, silent=False): if rebuilt_binaries_timestamp < 0: rebuilt_binaries_timestamp = 0 if not silent: - writemsg("!!! Invalid --rebuilt-binaries-timestamp parameter: '%s'\n" % \ - (myoptions.rebuilt_binaries_timestamp,), noiselevel=-1) + parser.error("Invalid --rebuilt-binaries-timestamp parameter: '%s'\n" % \ + (myoptions.rebuilt_binaries_timestamp,)) myoptions.rebuilt_binaries_timestamp = rebuilt_binaries_timestamp |