提交 5af1f177 编写于 作者: H hwb0703

fix product form bug for show command

上级 85f3b217
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册