summaryrefslogtreecommitdiff
path: root/lib/ansible/template/native_helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/template/native_helpers.py')
-rw-r--r--lib/ansible/template/native_helpers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ansible/template/native_helpers.py b/lib/ansible/template/native_helpers.py
index 3014c745..abe75c03 100644
--- a/lib/ansible/template/native_helpers.py
+++ b/lib/ansible/template/native_helpers.py
@@ -10,7 +10,7 @@ import ast
from itertools import islice, chain
from types import GeneratorType
-from ansible.module_utils._text import to_text
+from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.six import string_types
from ansible.parsing.yaml.objects import AnsibleVaultEncryptedUnicode
from ansible.utils.native_jinja import NativeJinjaText
@@ -67,7 +67,7 @@ def ansible_eval_concat(nodes):
)
)
)
- except (ValueError, SyntaxError, MemoryError):
+ except (TypeError, ValueError, SyntaxError, MemoryError):
pass
return out
@@ -129,7 +129,7 @@ def ansible_native_concat(nodes):
# parse the string ourselves without removing leading spaces/tabs.
ast.parse(out, mode='eval')
)
- except (ValueError, SyntaxError, MemoryError):
+ except (TypeError, ValueError, SyntaxError, MemoryError):
return out
if isinstance(evaled, string_types):