You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/03/08 14:44:39 UTC
[airflow] branch main updated: Use yaml safe load (#22085)
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 7f4935b Use yaml safe load (#22085)
7f4935b is described below
commit 7f4935bab36c41d5927610e38c46a30da2b80906
Author: Ćukasz Wyszomirski <wy...@google.com>
AuthorDate: Tue Mar 8 15:43:40 2022 +0100
Use yaml safe load (#22085)
---
airflow/providers/google/cloud/operators/cloud_build.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/providers/google/cloud/operators/cloud_build.py b/airflow/providers/google/cloud/operators/cloud_build.py
index 74af85f..afff12e 100644
--- a/airflow/providers/google/cloud/operators/cloud_build.py
+++ b/airflow/providers/google/cloud/operators/cloud_build.py
@@ -188,7 +188,7 @@ class CloudBuildCreateBuildOperator(BaseOperator):
return
with open(self.build_raw) as file:
if any(self.build_raw.endswith(ext) for ext in ['.yaml', '.yml']):
- self.build = yaml.load(file.read(), Loader=yaml.FullLoader)
+ self.build = yaml.safe_load_all(file.read())
if self.build_raw.endswith('.json'):
self.build = json.loads(file.read())