diff --git a/lib/ansible/errors/__init__.py b/lib/ansible/errors/__init__.py index 017272af7c..2185a83e4c 100644 --- a/lib/ansible/errors/__init__.py +++ b/lib/ansible/errors/__init__.py @@ -54,7 +54,7 @@ class AnsibleError(Exception): if obj and isinstance(obj, AnsibleBaseYAMLObject): extended_error = self._get_extended_error() if extended_error: - self.message = 'ERROR! %s\n\n%s' % (message, to_str(extended_error)) + self.message = 'ERROR! %s\n\n%s' % (to_str(message), to_str(extended_error)) else: self.message = 'ERROR! %s' % message