From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E8E9B138010 for ; Tue, 16 Oct 2012 22:16:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B9C6E027D; Tue, 16 Oct 2012 22:16:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E4284E027D for ; Tue, 16 Oct 2012 22:16:39 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3D34F33D965 for ; Tue, 16 Oct 2012 22:16:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C9F00E5436 for ; Tue, 16 Oct 2012 22:16:37 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1350425782.95bbfee84072a380ae31202ccc320abc9a1c31a9.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 95bbfee84072a380ae31202ccc320abc9a1c31a9 X-VCS-Branch: master Date: Tue, 16 Oct 2012 22:16:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 906a675f-0651-49ba-afce-d76534c7aaab X-Archives-Hash: 15f7b33c1dff9013d369e341aea10bf8 commit: 95bbfee84072a380ae31202ccc320abc9a1c31a9 Author: Zac Medico gentoo org> AuthorDate: Tue Oct 16 22:16:22 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Oct 16 22:16:22 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=95bbfee8 emerge_main: use parse_opts for --help --- pym/_emerge/main.py | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index ef94a47..d31d99a 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":