commit:     9f1d92c2e9c48af8a39dfcf1bdc044595ee3180c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 26 09:29:17 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Dec 26 09:29:17 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=9f1d92c2

gkeys/base.py: Improve help layout, unify no action help with py2.7

---
 gkeys/gkeys/base.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gkeys/gkeys/base.py b/gkeys/gkeys/base.py
index 2b32908..b09082f 100644
--- a/gkeys/gkeys/base.py
+++ b/gkeys/gkeys/base.py
@@ -164,7 +164,10 @@ class CliBase(object):
             help='The logging level to set for the logfile')
 
 
-        subparsers = parser.add_subparsers(help='actions')
+        subparsers = parser.add_subparsers(
+            title='Subcommands',
+            description='Valid subcommands',
+            help='Additional help')
         for name in self.cli_config['Available_Actions']:
             action_method = getattr(self.cli_config['Actions'], name)
             actiondoc = action_method.__doc__
@@ -183,7 +186,7 @@ class CliBase(object):
         parsed_args = parser.parse_args(args)
         action = getattr(parsed_args, 'action', None)
         if not action:
-            parser.print_help()
+            parser.print_usage()
             sys.exit(1)
         return parsed_args
 

Reply via email to