mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #28533 from jfindlay/decode_err
decode highstate error messages to utf-8
This commit is contained in:
commit
2e0c8264db
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user