mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Handle non-string types in comment
This is not supported, but we should convert blindly to string rather that stacktracing the highstate outputter.
This commit is contained in:
parent
11e34d047b
commit
1b5c6a240c
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ def _format_host(host, data):
|
|||
# be sure that ret['comment'] is utf-8 friendly
|
||||
try:
|
||||
if not isinstance(ret['comment'], six.text_type):
|
||||
ret['comment'] = ret['comment'].decode('utf-8')
|
||||
ret['comment'] = str(ret['comment']).decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
# but try to continue on errors
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue