From 4774eb9edebec7545361c8247bebbf7b86e35bf5 Mon Sep 17 00:00:00 2001
From: Seblu <sebastien.luttringer@smartjog.com>
Date: Wed, 24 Aug 2011 12:19:57 +0200
Subject: [PATCH] fix displaying of unknown command by help command

---
 bin/is | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/bin/is b/bin/is
index 7d1c463..7edc859 100755
--- a/bin/is
+++ b/bin/is
@@ -276,7 +276,7 @@ def c_help(parser, args):
     '''
     Show help
     '''
-    if args.command is None:
+    if args.command not in args.subparser.choices:
         parser.print_help()
     else:
         args.subparser.choices[args.command].print_help()
@@ -418,8 +418,7 @@ p_move.set_defaults(func=c_move)
 
 # help command parser
 p_help = subparsers.add_parser("help", help=c_help.__doc__.lower())
-p_help.add_argument("command", choices=subparsers.choices, nargs="?",
-                    help="command name")
+p_help.add_argument("command", nargs="?", help="command name")
 p_help.set_defaults(func=c_help, subparser=subparsers)
 
 # version command parser
-- 
GitLab