From 86c439c6cd72f15701cc410bbdbced1c8499d34b Mon Sep 17 00:00:00 2001 From: Martynov Maxim Date: Fri, 22 Dec 2023 12:56:11 +0300 Subject: [PATCH] Fix PythonVirtualenvOperator tests --- airflow/operators/python.py | 3 +++ 1 file changed, 3 insertions(+) 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]: