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