Message ID | 20190206194325.24875-2-plautrba@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] python/semanage module: Fix handling of -a/-e/-d/-r options | expand |
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 >
On Thu, Feb 7, 2019 at 10:47 PM Nicolas Iooss <nicolas.iooss@m4x.org> wrote: > > 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> Merged. Nicolas > > --- > > 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 > >
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):
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> --- python/semanage/semanage | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)