Allow Ansible to return error with unicode within it.

Fix for https://github.com/ansible/ansible/issues/13899
pull/14019/head
Yannig Perré 9 years ago committed by Toshio Kuratomi
parent 17b60f4fbf
commit 363b74e498

@ -54,7 +54,7 @@ class AnsibleError(Exception):
if obj and isinstance(obj, AnsibleBaseYAMLObject): if obj and isinstance(obj, AnsibleBaseYAMLObject):
extended_error = self._get_extended_error() extended_error = self._get_extended_error()
if 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: else:
self.message = 'ERROR! %s' % message self.message = 'ERROR! %s' % message

Loading…
Cancel
Save