From: Zac Medico Date: Tue, 16 Oct 2012 22:16:22 +0000 (-0700) Subject: emerge_main: use parse_opts for --help X-Git-Tag: v2.2.0_alpha139~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95bbfee84072a380ae31202ccc320abc9a1c31a9;p=portage.git emerge_main: use parse_opts for --help --- 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":