summaryrefslogtreecommitdiffstats
path: root/roles/lib_utils
diff options
context:
space:
mode:
Diffstat (limited to 'roles/lib_utils')
-rw-r--r--roles/lib_utils/library/yedit.py4
-rw-r--r--roles/lib_utils/src/class/yedit.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/roles/lib_utils/library/yedit.py b/roles/lib_utils/library/yedit.py
index 29475d603..7f71e6cbc 100644
--- a/roles/lib_utils/library/yedit.py
+++ b/roles/lib_utils/library/yedit.py
@@ -388,7 +388,7 @@ class Yedit(object):
if hasattr(yaml, 'RoundTripDumper'):
Yedit._write(self.filename, yaml.dump(self.yaml_dict, Dumper=yaml.RoundTripDumper))
else:
- Yedit._write(self.filename, yaml.dump(self.yaml_dict, default_flow_style=False))
+ Yedit._write(self.filename, yaml.safe_dump(self.yaml_dict, default_flow_style=False))
return (True, self.yaml_dict)
@@ -431,7 +431,7 @@ class Yedit(object):
if hasattr(yaml, 'RoundTripLoader'):
self.yaml_dict = yaml.load(contents, yaml.RoundTripLoader)
else:
- self.yaml_dict = yaml.load(contents)
+ self.yaml_dict = yaml.safe_load(contents)
# pylint: disable=no-member
if hasattr(self.yaml_dict, 'fa'):
self.yaml_dict.fa.set_block_style()
diff --git a/roles/lib_utils/src/class/yedit.py b/roles/lib_utils/src/class/yedit.py
index 4145a03b6..cecc1ed4f 100644
--- a/roles/lib_utils/src/class/yedit.py
+++ b/roles/lib_utils/src/class/yedit.py
@@ -202,7 +202,7 @@ class Yedit(object):
if hasattr(yaml, 'RoundTripDumper'):
Yedit._write(self.filename, yaml.dump(self.yaml_dict, Dumper=yaml.RoundTripDumper))
else:
- Yedit._write(self.filename, yaml.dump(self.yaml_dict, default_flow_style=False))
+ Yedit._write(self.filename, yaml.safe_dump(self.yaml_dict, default_flow_style=False))
return (True, self.yaml_dict)
@@ -245,7 +245,7 @@ class Yedit(object):
if hasattr(yaml, 'RoundTripLoader'):
self.yaml_dict = yaml.load(contents, yaml.RoundTripLoader)
else:
- self.yaml_dict = yaml.load(contents)
+ self.yaml_dict = yaml.safe_load(contents)
# pylint: disable=no-member
if hasattr(self.yaml_dict, 'fa'):
self.yaml_dict.fa.set_block_style()