From 2f5e817007a271cf6673ddabdc0683f88712100d Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 8 Oct 2015 08:31:12 -0700 Subject: [PATCH] Do not mix byte str with unicode type --- 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 bc21820033..668e349b06 100644 --- a/lib/ansible/utils/display.py +++ b/lib/ansible/utils/display.py @@ -247,9 +247,9 @@ class Display: def error(self, msg, wrap_text=True): if wrap_text: - new_msg = "\n[ERROR]: %s" % msg + new_msg = u"\n[ERROR]: %s" % msg wrapped = textwrap.wrap(new_msg, self.columns) - new_msg = "\n".join(wrapped) + "\n" + new_msg = u"\n".join(wrapped) + u"\n" else: new_msg = msg if new_msg not in self._errors: