|
|
@ -78,7 +78,7 @@ class AnsibleConstructor(SafeConstructor):
|
|
|
|
|
|
|
|
|
|
|
|
return mapping
|
|
|
|
return mapping
|
|
|
|
|
|
|
|
|
|
|
|
def construct_yaml_str(self, node, unsafe=False):
|
|
|
|
def construct_yaml_str(self, node):
|
|
|
|
# Override the default string handling function
|
|
|
|
# Override the default string handling function
|
|
|
|
# to always return unicode objects
|
|
|
|
# to always return unicode objects
|
|
|
|
value = self.construct_scalar(node)
|
|
|
|
value = self.construct_scalar(node)
|
|
|
@ -86,9 +86,6 @@ class AnsibleConstructor(SafeConstructor):
|
|
|
|
|
|
|
|
|
|
|
|
ret.ansible_pos = self._node_position_info(node)
|
|
|
|
ret.ansible_pos = self._node_position_info(node)
|
|
|
|
|
|
|
|
|
|
|
|
if unsafe:
|
|
|
|
|
|
|
|
ret = wrap_var(ret)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ret
|
|
|
|
return ret
|
|
|
|
|
|
|
|
|
|
|
|
def construct_vault_encrypted_unicode(self, node):
|
|
|
|
def construct_vault_encrypted_unicode(self, node):
|
|
|
@ -113,7 +110,7 @@ class AnsibleConstructor(SafeConstructor):
|
|
|
|
data.ansible_pos = self._node_position_info(node)
|
|
|
|
data.ansible_pos = self._node_position_info(node)
|
|
|
|
|
|
|
|
|
|
|
|
def construct_yaml_unsafe(self, 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):
|
|
|
|
def _node_position_info(self, node):
|
|
|
|
# the line number where the previous token has ended (plus empty lines)
|
|
|
|
# the line number where the previous token has ended (plus empty lines)
|
|
|
|