From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-615753-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 39522138200 for <garchives@archives.gentoo.org>; Sat, 3 Aug 2013 00:49:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB538E09F2; Sat, 3 Aug 2013 00:49:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3CCB6E09F2 for <gentoo-commits@lists.gentoo.org>; Sat, 3 Aug 2013 00:49:18 +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 04A9233EC16 for <gentoo-commits@lists.gentoo.org>; Sat, 3 Aug 2013 00:49:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 84F51E468F for <gentoo-commits@lists.gentoo.org>; Sat, 3 Aug 2013 00:49:15 +0000 (UTC) From: "Zac Medico" <zmedico@gentoo.org> 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" <zmedico@gentoo.org> Message-ID: <1375490905.3e12410b8c7a6ea5416f24a6e15cd377917ab775.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/binhost-snapshot X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 3e12410b8c7a6ea5416f24a6e15cd377917ab775 X-VCS-Branch: master Date: Sat, 3 Aug 2013 00:49:15 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3a0af397-6298-401d-be59-5c490dd3cbfb X-Archives-Hash: 4327baa797b9ea9a2a08d71097e1c6c4 commit: 3e12410b8c7a6ea5416f24a6e15cd377917ab775 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat Aug 3 00:48:25 2013 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Aug 3 00:48:25 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3e12410b binhost-snapshot: portage.util._argparse --- bin/binhost-snapshot | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/binhost-snapshot b/bin/binhost-snapshot index e9bd45a..376080c 100755 --- a/bin/binhost-snapshot +++ b/bin/binhost-snapshot @@ -3,7 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 import io -import optparse import os import sys import textwrap @@ -18,6 +17,7 @@ pym_path = osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym") sys.path.insert(0, pym_path) import portage portage._internal_caller = True +from portage.util._argparse import ArgumentParser def parse_args(argv): prog_name = os.path.basename(argv[0]) @@ -45,11 +45,12 @@ def parse_args(argv): "write Packages index with\n" + \ " snapshot_uri" - parser = optparse.OptionParser(usage=usage) - parser.add_option('--hardlinks', help='create hardlinks (y or n, default is y)', - choices=('y', 'n')) - parser.set_defaults(hardlinks='y') - options, args = parser.parse_args(argv[1:]) + parser = ArgumentParser(usage=usage) + parser.add_argument('--hardlinks', + help='create hardlinks (y or n, default is y)', + choices=('y', 'n'), + default='y') + options, args = parser.parse_known_args(argv[1:]) if len(args) != 4: parser.error("Required 4 arguments, got %d" % (len(args),))