From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QTPwP-0003Io-Lv for garchives@archives.gentoo.org; Mon, 06 Jun 2011 02:53:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91D201C063; Mon, 6 Jun 2011 02:53:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5C3C21C063 for ; Mon, 6 Jun 2011 02:53:13 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BDC8F1B4002 for ; Mon, 6 Jun 2011 02:53:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 966748003C for ; Mon, 6 Jun 2011 02:53:11 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <81bd25882a4e3dc39751e915fecadae7d7368662.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/portageq X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 81bd25882a4e3dc39751e915fecadae7d7368662 Date: Mon, 6 Jun 2011 02:53:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 3a01d05e68f6b0c2621b97dd207d8616 commit: 81bd25882a4e3dc39751e915fecadae7d7368662 Author: Zac Medico gentoo org> AuthorDate: Mon Jun 6 02:52:42 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Jun 6 02:52:42 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D81bd2588 portageq: support --version --- bin/portageq | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/portageq b/bin/portageq index 92719fb..fa71388 100755 --- a/bin/portageq +++ b/bin/portageq @@ -719,13 +719,18 @@ def main(): if nocolor in ('yes', 'true'): portage.output.nocolor() =20 - if "-h" in sys.argv or "--help" in sys.argv: - usage(sys.argv) - sys.exit(os.EX_OK) - elif len(sys.argv) < 2: + if len(sys.argv) < 2: usage(sys.argv) sys.exit(os.EX_USAGE) =20 + for x in sys.argv: + if x in ("-h", "--help"): + usage(sys.argv) + sys.exit(os.EX_OK) + elif x =3D=3D "--version": + print("Portage", portage.VERSION) + sys.exit(os.EX_OK) + cmd =3D sys.argv[1] function =3D globals().get(cmd) if function is None or cmd not in commands: