diff --git a/airflow/operators/python.py b/airflow/operators/python.py index e134108253912..1c5c9d3f6953c 100644 --- a/airflow/operators/python.py +++ b/airflow/operators/python.py @@ -472,6 +472,9 @@ def _execute_python_callable_in_subprocess(self, python_path: Path): else: raise + if 0 in self.skip_on_exit_code: + raise AirflowSkipException("Process exited with code 0. Skipping.") + return self._read_result(output_path) def determine_kwargs(self, context: Mapping[str, Any]) -> Mapping[str, Any]: