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 E52301381F3 for ; Fri, 2 Aug 2013 18:06:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7E8D4E0B67; Fri, 2 Aug 2013 18:06:10 +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 1E09FE0B67 for ; Fri, 2 Aug 2013 18:06:10 +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 1C90633EB9C for ; Fri, 2 Aug 2013 18:06:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 20EBDE5459 for ; Fri, 2 Aug 2013 18:06:07 +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: <1375466751.3b5023b646455cce1d7ba43c0dd065fb0b99717c.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/xattr-helper.py X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 3b5023b646455cce1d7ba43c0dd065fb0b99717c X-VCS-Branch: master Date: Fri, 2 Aug 2013 18:06:07 +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: 015b4c57-8dcd-44ae-a954-b34058627d8d X-Archives-Hash: 775fb9cdcf4f3857b024a46f54d27b73 commit: 3b5023b646455cce1d7ba43c0dd065fb0b99717c Author: Zac Medico gentoo org> AuthorDate: Fri Aug 2 18:05:51 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Aug 2 18:05:51 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3b5023b6 xattr-helper.py: portage.util._argparse --- bin/xattr-helper.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/xattr-helper.py b/bin/xattr-helper.py index e63f2cb..a85309f 100755 --- a/bin/xattr-helper.py +++ b/bin/xattr-helper.py @@ -1,13 +1,14 @@ #!/usr/bin/python -# Copyright 2012 Gentoo Foundation +# Copyright 2012-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import array -import optparse import os import re import sys +from portage.util._argparse import ArgumentParser + if hasattr(os, "getxattr"): class xattr(object): @@ -128,21 +129,20 @@ def main(argv): usage = "usage: %s [--dump | --restore]\n" % \ os.path.basename(argv[0]) - parser = optparse.OptionParser(description=description, usage=usage) + parser = ArgumentParser(description=description, usage=usage) - actions = optparse.OptionGroup(parser, 'Actions') - actions.add_option("--dump", + actions = parser.add_argument_group('Actions') + actions.add_argument("--dump", action="store_true", help="Dump the values of all extended " "attributes associated with null-separated" " paths read from stdin.") - actions.add_option("--restore", + actions.add_argument("--restore", action="store_true", help="Restore extended attributes using" " a dump read from stdin.") - parser.add_option_group(actions) - options, args = parser.parse_args(argv[1:]) + options, args = parser.parse_known_args(argv[1:]) if len(args) != 0: parser.error("expected zero arguments, "