KVM test: kvm_subprocess.py: don't sanitize text before passing it to callbacks
Converting the text to utf-8 seems to cause trouble when converting back (e.g.
when writing to files). The logging system seems to be fine with unsanitized
text, so let's not sanitize it.
Signed-off-by: Michael Goldish <mgoldish@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4668 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/kvm/kvm_subprocess.py b/client/tests/kvm/kvm_subprocess.py
index 73edc5d..93a8429 100755
--- a/client/tests/kvm/kvm_subprocess.py
+++ b/client/tests/kvm/kvm_subprocess.py
@@ -688,9 +688,7 @@
def print_line(text):
# Pre-pend prefix and remove trailing whitespace
text = self.output_prefix + text.rstrip()
- # Sanitize text
- text = text.decode("utf-8", "replace")
- # Pass it to output_func
+ # Pass text to output_func
try:
params = self.output_params + (text,)
self.output_func(*params)
@@ -888,7 +886,7 @@
if str.endswith("\n"):
str = str[:-1]
for line in str.split("\n"):
- print_func(line.decode("utf-8", "replace"))
+ print_func(line)
data += newdata
done = False