diff --git a/src/core/command/console.py b/src/core/command/console.py index 31ffca231b6b9dd578dd755d9848e1210ce6cedf..5ff82ed876322dfe35684228a25c6c82d978b90e 100755 --- a/src/core/command/console.py +++ b/src/core/command/console.py @@ -65,21 +65,6 @@ class Console(object): def __init__(self): pass - - @staticmethod - def _parse_combination_param(combination_value): - # sample: size:xxx1;exclude-annotation:xxx - parse_result = {} - key_value_pairs = str(combination_value).split(";") - for key_value_pair in key_value_pairs: - key, value = key_value_pair.split(":", 1) - if not value: - raise ParamError("'%s' no value" % key) - value_list = str(value).split(",") - exist_list = parse_result.get(key, []) - exist_list.extend(value_list) - parse_result[key] = exist_list - return parse_result @staticmethod def _parse_combination_param(combination_value): @@ -397,21 +382,6 @@ class Console(object): def handler_ctrl_z(self, signalnum, frame): pass - - def console(self, args): - """ - Main xDevice console providing user with the interface to interact - """ - EnvironmentManager() - if args is None or len(args) < 2: - self.wizard_dic = show_wizard_mode() - print(self.wizard_dic) - if self._build_version(self.wizard_dic["productform"]): - self._console() - else: - LOG.error("Build version failed, exit test framework.") - else: - self.command_parser(" ".join(args[1:])) def command_parser(self, args): try: @@ -455,6 +425,21 @@ class Console(object): except (AttributeError, IOError, IndexError, ImportError, NameError, RuntimeError, SystemError, TypeError, ValueError) as exception: LOG.exception(exception, exc_info=False) + + def console(self, args): + """ + Main xDevice console providing user with the interface to interact + """ + EnvironmentManager() + if args is None or len(args) < 2: + self.wizard_dic = show_wizard_mode() + print(self.wizard_dic) + if self._build_version(self.wizard_dic["productform"]): + self._console() + else: + LOG.error("Build version failed, exit test framework.") + else: + self.command_parser(" ".join(args[1:])) # 命令执行总入口 def _console(self):