This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new af4b51cdfc Fix PythonVirtualenvOperator tests (#36367)
af4b51cdfc is described below

commit af4b51cdfc8f98bec9922facd165ea8a6440c12b
Author: Maxim Martynov <[email protected]>
AuthorDate: Fri Dec 22 14:08:03 2023 +0300

    Fix PythonVirtualenvOperator tests (#36367)
---
 airflow/operators/python.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/airflow/operators/python.py b/airflow/operators/python.py
index e134108253..1c5c9d3f69 100644
--- a/airflow/operators/python.py
+++ b/airflow/operators/python.py
@@ -472,6 +472,9 @@ class _BasePythonVirtualenvOperator(PythonOperator, 
metaclass=ABCMeta):
                 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]:

Reply via email to