From 0822ba3091542c54693365bcf0491e608edbf628 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Mon, 18 Jul 2016 12:25:45 +0800 Subject: provider:checkbox: Fix UnicodeDecodeError in fwts_test script --- bin/fwts_test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/fwts_test b/bin/fwts_test index 9b0f616..cb0924b 100755 --- a/bin/fwts_test +++ b/bin/fwts_test @@ -413,10 +413,10 @@ def main(): # generated by FWTS. with open(args.log, 'a') as logfile: logfile.write("--- beginning of dmesg ---\n") - logfile.write(check_output('dmesg', universal_newlines=True)) + logfile.write(check_output('dmesg').decode('utf-8', 'ignore')) logfile.write("--- end of dmesg ---\n") logfile.write("--- beginning of syslog ---\n") - logfile.write(check_output(['cat', '/var/log/syslog'], universal_newlines=True)) + logfile.write(check_output(['cat', '/var/log/syslog']).decode('utf-8', 'ignore')) logfile.write("--- end of syslog ---\n") # parse the summaries -- cgit v1.2.3