From d1e0719e4cd16fdd9d85dcf59a5c5c3741fa6583 Mon Sep 17 00:00:00 2001 From: qqo Date: Wed, 16 Mar 2016 23:47:16 +0300 Subject: [PATCH] fix TypeError: coercing to Unicode: need string or buffer, AnsibleParserError found --- lib/ansible/utils/display.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/utils/display.py b/lib/ansible/utils/display.py index e94c8f0397..220bbd381d 100644 --- a/lib/ansible/utils/display.py +++ b/lib/ansible/utils/display.py @@ -108,7 +108,7 @@ class Display: """ Display a message to the user Note: msg *must* be a unicode string to prevent UnicodeError tracebacks. - """ + """ # FIXME: this needs to be implemented #msg = utils.sanitize_output(msg) @@ -273,7 +273,7 @@ class Display: wrapped = textwrap.wrap(new_msg, self.columns) new_msg = u"\n".join(wrapped) + u"\n" else: - new_msg = u"ERROR! " + msg + new_msg = u"ERROR! %s" % msg if new_msg not in self._errors: self.display(new_msg, color=C.COLOR_ERROR, stderr=True) self._errors[new_msg] = 1