From: Nicolas Iooss <nicolas.iooss@m4x.org>
To: Petr Lautrbach <plautrba@redhat.com>
Cc: selinux@vger.kernel.org
Subject: Re: [PATCH 2/2] python/semanage: Use standard argparse.error() method in handlePermissive
Date: Thu, 7 Feb 2019 22:47:41 +0100 [thread overview]
Message-ID: <CAJfZ7==AuhPnrqqiBDh8YAQ9X7_G2VxGTDR7wdr7xSm7UVLPrQ@mail.gmail.com> (raw)
In-Reply-To: <20190206194325.24875-2-plautrba@redhat.com>
On Wed, Feb 6, 2019 at 8:43 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> This method prints a usage message including the message to the standard error
> and terminates the program with a status code of 2.
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
For this patch:
Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> ---
> python/semanage/semanage | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/python/semanage/semanage b/python/semanage/semanage
> index 9b737fa8..a9fcb319 100644
> --- a/python/semanage/semanage
> +++ b/python/semanage/semanage
> @@ -743,9 +743,7 @@ def handlePermissive(args):
> if args.action == "delete":
> OBJECT.delete(args.type)
> else:
> - args.parser.print_usage(sys.stderr)
> - sys.stderr.write(_('semanage permissive: error: the following argument is required: type\n'))
> - sys.exit(1)
> + args.parser.error(message=_('semanage permissive: error: the following argument is required: type\n'))
>
>
> def setupPermissiveParser(subparsers):
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-02-07 21:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 19:43 [PATCH 1/2] python/semanage module: Fix handling of -a/-e/-d/-r options Petr Lautrbach
2019-02-06 19:43 ` [PATCH 2/2] python/semanage: Use standard argparse.error() method in handlePermissive Petr Lautrbach
2019-02-07 21:47 ` Nicolas Iooss [this message]
2019-02-10 16:51 ` Nicolas Iooss
2019-02-07 21:46 ` [PATCH 1/2] python/semanage module: Fix handling of -a/-e/-d/-r options Nicolas Iooss
2019-02-15 14:28 ` Petr Lautrbach
2019-02-15 16:00 ` [PATCH v2 1/3] python/semanage: Drop python shebang from seobject.py Petr Lautrbach
2019-02-15 16:00 ` [PATCH v2 2/3] python/semanage: Update semanage to use python3 Petr Lautrbach
2019-02-15 16:00 ` [PATCH v2 3/3] python/semanage module: Fix handling of -a/-e/-d/-r options Petr Lautrbach
2019-02-17 20:42 ` Nicolas Iooss
2019-02-19 22:07 ` Nicolas Iooss
2019-02-17 20:41 ` [PATCH 1/2] " Nicolas Iooss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJfZ7==AuhPnrqqiBDh8YAQ9X7_G2VxGTDR7wdr7xSm7UVLPrQ@mail.gmail.com' \
--to=nicolas.iooss@m4x.org \
--cc=plautrba@redhat.com \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).