From c8aad908c8e5219aa56ae8128d04d08fb47c3f14 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Fri, 3 Jun 2016 12:04:22 +0300 Subject: [PATCH] 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. (From OE-Core rev: b3f4de76d1b32c5079b0b857655cc2baad088519) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- scripts/send-error-report | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/send-error-report b/scripts/send-error-report index ff23552b66..15b5e84911 100755 --- a/scripts/send-error-report +++ b/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):