summaryrefslogtreecommitdiff
path: root/lib/ansible/parsing
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2018-11-28 14:37:03 -0500
committerToshio Kuratomi <a.badger@gmail.com>2018-11-30 13:07:00 -0800
commit8c43ce491e4ff62c0c6cca83398e7ab7e9ec2310 (patch)
treee38e7011d290534d2e2b72b3b7e41f32cddb2f2f /lib/ansible/parsing
parent031e961c58a41947c92c14d6734e39bfb6daeaf8 (diff)
downloadansible-8c43ce491e4ff62c0c6cca83398e7ab7e9ec2310.tar.gz
unsafe cleanup
Diffstat (limited to 'lib/ansible/parsing')
-rw-r--r--lib/ansible/parsing/yaml/constructor.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/ansible/parsing/yaml/constructor.py b/lib/ansible/parsing/yaml/constructor.py
index b6b4a3e7b8..1483db814b 100644
--- a/lib/ansible/parsing/yaml/constructor.py
+++ b/lib/ansible/parsing/yaml/constructor.py
@@ -78,7 +78,7 @@ class AnsibleConstructor(SafeConstructor):
return mapping
- def construct_yaml_str(self, node, unsafe=False):
+ def construct_yaml_str(self, node):
# Override the default string handling function
# to always return unicode objects
value = self.construct_scalar(node)
@@ -86,9 +86,6 @@ class AnsibleConstructor(SafeConstructor):
ret.ansible_pos = self._node_position_info(node)
- if unsafe:
- ret = wrap_var(ret)
-
return ret
def construct_vault_encrypted_unicode(self, node):
@@ -113,7 +110,7 @@ class AnsibleConstructor(SafeConstructor):
data.ansible_pos = self._node_position_info(node)
def construct_yaml_unsafe(self, node):
- return self.construct_yaml_str(node, unsafe=True)
+ return wrap_var(self.construct_yaml_str(node))
def _node_position_info(self, node):
# the line number where the previous token has ended (plus empty lines)