From d2424c6c984ff6ed792487cb12dee4689cbf781c Mon Sep 17 00:00:00 2001 From: Jason Zaman Date: Fri, 5 Aug 2016 02:34:05 +0800 Subject: [PATCH] semanage: Print usage when no args https://bugs.python.org/issue16308 Traceback (most recent call last): File "semanage", line 932, in do_parser() File "semanage", line 911, in do_parser args.func(args) AttributeError: 'Namespace' object has no attribute 'func' Signed-off-by: James Carter --- policycoreutils/semanage/semanage | 1 + 1 file changed, 1 insertion(+) diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage index d9452437..5d783b14 100644 --- a/policycoreutils/semanage/semanage +++ b/policycoreutils/semanage/semanage @@ -856,6 +856,7 @@ def createCommandParser(): #To add a new subcommand define the parser for it in a function above and call it here. subparsers = commandParser.add_subparsers(dest='subcommand') + subparsers.required = True setupImportParser(subparsers) setupExportParser(subparsers) setupLoginParser(subparsers)