diff --git a/oedp/src/commands/run/run_cmd.py b/oedp/src/commands/run/run_cmd.py index 9e92a922bf059f697bbac5cbf5b6af5838730ca0..be38854871924bf56bb7246f0eeef5344847e7aa 100644 --- a/oedp/src/commands/run/run_cmd.py +++ b/oedp/src/commands/run/run_cmd.py @@ -42,5 +42,8 @@ class RunCmd: except ConfigException as e: self.log.error(f'Failed to get project main info: {e}') return False + if 'tasks' not in action: + self.log.error(f'Failed to get tasks info: {action}') + return False tasks = action['tasks'] return RunAction(self.project, self.action, tasks).run() diff --git a/oedp/src/utils/main_reader.py b/oedp/src/utils/main_reader.py index 0b0c2e044753f884173f9fa3a217fbbcdff198f9..17d0a3c7dc32eb6153ad441e448d6d60f9e783d5 100644 --- a/oedp/src/utils/main_reader.py +++ b/oedp/src/utils/main_reader.py @@ -108,11 +108,11 @@ class MainReader: :return: 方法详情 """ if 'action' not in self.main: - return {} + raise ConfigException(f'No such action named {action}') if not isinstance(self.main['action'], dict): - return {} + raise ConfigException(f'No such action named {action}') if action not in self.main['action']: - return {} + raise ConfigException(f'No such action named {action}') if not isinstance(self.main['action'][action], dict): return {} return self.main['action'][action]