From 95bbfee84072a380ae31202ccc320abc9a1c31a9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 16 Oct 2012 15:16:22 -0700 Subject: [PATCH] emerge_main: use parse_opts for --help --- pym/_emerge/main.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index ef94a4760..d31d99ae4 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -961,12 +961,6 @@ def emerge_main(args=None): # Disable color until we're sure that it should be enabled (after # EMERGE_DEFAULT_OPTS has been parsed). portage.output.havecolor = 0 - - # optimize --help (no need to load config / EMERGE_DEFAULT_OPTS) - if "--help" in args or "-h" in args: - emerge_help() - return 0 - portage._disable_legacy_globals() portage.dep._internal_warnings = True @@ -984,6 +978,11 @@ def emerge_main(args=None): if "--accept-properties" in myopts: os.environ["ACCEPT_PROPERTIES"] = myopts["--accept-properties"] + # optimize --help (no need to load config / EMERGE_DEFAULT_OPTS) + if myaction == "help": + emerge_help() + return os.EX_OK + # Portage needs to ensure a sane umask for the files it creates. os.umask(0o22) if myaction == "sync": -- 2.26.2