mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Fix string coercion problem in error handling code 10:50 (#16270)
Manifests as the following stack trace File "/usr/local/Cellar/ansible/2.0.1.0/libexec/lib/python2.7/site-packages/ansible/utils/display.py", line 259, in error new_msg = u"ERROR! " + msg TypeError: coercing to Unicode: need string or buffer, AnsibleParserError found
This commit is contained in:
parent
73fcf9ba6e
commit
38590fbab9
1 changed files with 1 additions and 1 deletions
|
@ -278,7 +278,7 @@ class Display:
|
||||||
wrapped = textwrap.wrap(new_msg, self.columns)
|
wrapped = textwrap.wrap(new_msg, self.columns)
|
||||||
new_msg = u"\n".join(wrapped) + u"\n"
|
new_msg = u"\n".join(wrapped) + u"\n"
|
||||||
else:
|
else:
|
||||||
new_msg = u"ERROR! " + msg
|
new_msg = u"ERROR! %s" % msg
|
||||||
if new_msg not in self._errors:
|
if new_msg not in self._errors:
|
||||||
self.display(new_msg, color=C.COLOR_ERROR, stderr=True)
|
self.display(new_msg, color=C.COLOR_ERROR, stderr=True)
|
||||||
self._errors[new_msg] = 1
|
self._errors[new_msg] = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue