From: garciadeblas Date: Tue, 5 Jul 2022 16:05:04 +0000 (+0200) Subject: Use of yaml.SafeLoader instead of yaml.Loader X-Git-Tag: release-v13.0-start~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F12302%2F3;p=osm%2FN2VC.git Use of yaml.SafeLoader instead of yaml.Loader Change-Id: I11a4775ac657275d14b3d7a76abbefdca5d556f4 Signed-off-by: garciadeblas --- diff --git a/n2vc/n2vc_conn.py b/n2vc/n2vc_conn.py index 68e8c14..d38bcad 100644 --- a/n2vc/n2vc_conn.py +++ b/n2vc/n2vc_conn.py @@ -524,4 +524,4 @@ def obj_to_dict(obj: object) -> dict: # convert obj to yaml yaml_text = obj_to_yaml(obj) # parse to dict - return yaml.load(yaml_text, Loader=yaml.Loader) + return yaml.load(yaml_text, Loader=yaml.SafeLoader) diff --git a/n2vc/utils.py b/n2vc/utils.py index 286f0fc..a4a6a23 100644 --- a/n2vc/utils.py +++ b/n2vc/utils.py @@ -149,7 +149,7 @@ def obj_to_dict(obj: object) -> dict: # convert obj to yaml yaml_text = obj_to_yaml(obj) # parse to dict - return yaml.load(yaml_text, Loader=yaml.Loader) + return yaml.load(yaml_text, Loader=yaml.SafeLoader) def get_ee_id_components(ee_id: str) -> Tuple[str, str, str]: