mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
use 'replace' strategy for invalid encodings
This commit is contained in:
parent
89e0781be7
commit
9b67ec0d3d
@ -591,7 +591,7 @@ def _run(cmd,
|
||||
out = u''
|
||||
except UnicodeDecodeError:
|
||||
log.error("UnicodeDecodeError while decoding output of cmd {0}".format(cmd))
|
||||
out = proc.stdout.decode(__salt_system_encoding__, 'ignore')
|
||||
out = proc.stdout.decode(__salt_system_encoding__, 'replace')
|
||||
|
||||
try:
|
||||
err = proc.stderr.decode(__salt_system_encoding__)
|
||||
@ -599,7 +599,7 @@ def _run(cmd,
|
||||
err = u''
|
||||
except UnicodeDecodeError:
|
||||
log.error("UnicodeDecodeError while decoding error of cmd {0}".format(cmd))
|
||||
err = proc.stderr.decode(__salt_system_encoding__, 'ignore')
|
||||
err = proc.stderr.decode(__salt_system_encoding__, 'replace')
|
||||
|
||||
|
||||
if rstrip:
|
||||
|
Loading…
Reference in New Issue
Block a user