From 5af1f1777823b830bacaa34a33d024ac0ed70c97 Mon Sep 17 00:00:00 2001 From: hwb0703 Date: Thu, 18 Mar 2021 11:05:40 +0800 Subject: [PATCH] fix product form bug for show command --- src/core/command/console.py | 8 +++++--- src/core/command/display.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/command/console.py b/src/core/command/console.py index 15c896b..3c6196d 100755 --- a/src/core/command/console.py +++ b/src/core/command/console.py @@ -226,7 +226,9 @@ class Console(object): if command.startswith(ToolCommandType.TOOLCMD_KEY_HELP): self._process_command_help(para_list) elif command.startswith(ToolCommandType.TOOLCMD_KEY_SHOW): - self._process_command_show(para_list) + if "productform" in self.wizard_dic: + productform = self.wizard_dic["productform"] + self._process_command_show(para_list, productform) elif command.startswith(ToolCommandType.TOOLCMD_KEY_RUN): if "productform" in self.wizard_dic: options.productform = self.wizard_dic["productform"] @@ -251,9 +253,9 @@ class Console(object): return @classmethod - def _process_command_show(cls, para_list): + def _process_command_show(cls, para_list, productform="phone"): if para_list[0] == ToolCommandType.TOOLCMD_KEY_SHOW: - display_show_info(para_list) + display_show_info(para_list, productform) else: LOG.error("Wrong show command.") return diff --git a/src/core/command/display.py b/src/core/command/display.py index 6007667..43adeaa 100755 --- a/src/core/command/display.py +++ b/src/core/command/display.py @@ -200,13 +200,13 @@ def display_help_info(para_list): print(HLEP_COMMAND_INFOMATION) -def display_show_info(para_list): +def display_show_info(para_list, productform): if len(para_list) == 0 or para_list[0] != ToolCommandType.TOOLCMD_KEY_SHOW: print("This command is not support.") return if len(para_list) > 1: - display_show_command_info(para_list[1]) + display_show_command_info(para_list[1], productform) else: print(SUPPORT_COMMAND_SHOW) -- Gitee