From da753512f9d9680557ad93a4c4d5bdc6c56f87dc Mon Sep 17 00:00:00 2001 From: Deepjyoti Mondal Date: Sun, 21 Apr 2019 21:58:52 +0530 Subject: [PATCH] Fixes #101 - Show help messages for individual commands This fixes the issue with help command. Now help will show the desired help string for valid commands --- kafka/tools/protocol/help.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kafka/tools/protocol/help.py b/kafka/tools/protocol/help.py index b361d7d..4dcc9a4 100644 --- a/kafka/tools/protocol/help.py +++ b/kafka/tools/protocol/help.py @@ -28,7 +28,7 @@ def show_help(request_classes, request_cmds, cmd_args): ", ".join([request_classes[request][ver].cmd + "V{0}".format(ver) for ver in sorted(request_classes[request].keys())]))) print("\nFor more information on a request, type \"help \"") - elif cmd_args[0] in request_cmds: - print(request_cmds[cmd_args[0]].help_string) + elif cmd_args[0].lower() in request_cmds: + print(request_cmds[cmd_args[0].lower()].help_string) else: print("{0} is not a valid request".format(cmd_args[0]))