From e5ea57646186dd4ec834e0c824c3942a60278db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannig=20Perr=C3=A9?= Date: Thu, 14 Jan 2016 22:32:05 +0100 Subject: [PATCH] Allow Ansible to return error with unicode within it. Fix for https://github.com/ansible/ansible/issues/13899 --- lib/ansible/errors/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/errors/__init__.py b/lib/ansible/errors/__init__.py index 017272af7ca..2185a83e4c0 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