mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #51387 from chrillux/make-binarydata-output-possible
Make binary data output possible
This commit is contained in:
commit
b1f7e85b4f
1 changed files with 11 additions and 1 deletions
|
@ -130,9 +130,19 @@ class NestDisplay(object):
|
|||
elif isinstance(ret, six.string_types):
|
||||
first_line = True
|
||||
for line in ret.splitlines():
|
||||
line_prefix = ' ' * len(prefix) if not first_line else prefix
|
||||
if isinstance(line, bytes):
|
||||
out.append(
|
||||
self.ustring(
|
||||
indent,
|
||||
self.YELLOW,
|
||||
'Not string data',
|
||||
prefix=line_prefix
|
||||
)
|
||||
)
|
||||
break
|
||||
if self.strip_colors:
|
||||
line = salt.output.strip_esc_sequence(line)
|
||||
line_prefix = ' ' * len(prefix) if not first_line else prefix
|
||||
out.append(
|
||||
self.ustring(
|
||||
indent,
|
||||
|
|
Loading…
Add table
Reference in a new issue