From 68813f9698ecdc5f6cb137280bce8c4a0e6bfec4 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Wed, 26 Dec 2018 21:36:23 +0800 Subject: [PATCH] Fix command finding bug --- none/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/none/command.py b/none/command.py index b6067dea..0bef2768 100644 --- a/none/command.py +++ b/none/command.py @@ -200,7 +200,8 @@ def _find_command(name: Union[str, CommandName_T]) -> Optional[Command]: return None cmd_tree = cmd_tree[part] - return cmd_tree.get(cmd_name[-1]) + cmd = cmd_tree.get(cmd_name[-1]) + return cmd if isinstance(cmd, Command) else None class _FurtherInteractionNeeded(Exception):