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 <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh 2016-06-03 12:04:22 +03:00 committed by Richard Purdie
parent 14b758b570
commit c8aad908c8
1 changed files with 1 additions and 1 deletions

View File

@ -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):