Browse Source

send-error-report: encode data to bytes

Encoded data before sending it through http as urllib expecting bytes.
Fixed TypeError: POST data should be bytes or an iterable of bytes. It
cannot be of type str.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ed Bartosh 8 years ago
parent
commit
b3f4de76d1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/send-error-report

+ 1 - 1
scripts/send-error-report

@@ -125,7 +125,7 @@ def prepare_data(args):
         with open(args.error_file, 'r') as json_fp:
             data = json_fp.read()
 
-    return data
+    return data.encode('utf-8')
 
 
 def send_data(data, args):