mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-16 22:01:15 +00: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:
committed by
Toshio Kuratomi
parent
73fcf9ba6e
commit
38590fbab9
@@ -278,7 +278,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
|
||||
|
||||
Reference in New Issue
Block a user