Merge pull request #28533 from jfindlay/decode_err

decode highstate error messages to utf-8
This commit is contained in:
Mike Place 2015-11-04 07:47:55 -07:00
commit 2e0c8264db

View File

@ -71,6 +71,7 @@ import textwrap
import salt.utils
import salt.utils.locales
import salt.output
from salt.utils.locales import sdecode
# Import 3rd-party libs
import salt.ext.six as six
@ -111,7 +112,7 @@ def _format_host(host, data):
.format(hcolor, colors)))
for err in data:
if strip_colors:
err = salt.output.strip_esc_sequence(err)
err = salt.output.strip_esc_sequence(sdecode(err))
hstrs.append((u'{0}----------\n {1}{2[ENDC]}'
.format(hcolor, err, colors)))
if isinstance(data, dict):