diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-06-03 12:04:22 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-03 13:13:30 +0100 |
| commit | c8aad908c8e5219aa56ae8128d04d08fb47c3f14 (patch) | |
| tree | 85d21aff7aa4b088a631bf59d806a1caaac06084 /scripts/send-error-report | |
| parent | 14b758b5703739dfb1373852be5cb11bf594b140 (diff) | |
| download | poky-c8aad908c8e5219aa56ae8128d04d08fb47c3f14.tar.gz | |
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>
Diffstat (limited to 'scripts/send-error-report')
| -rwxr-xr-x | scripts/send-error-report | 2 |
1 files changed, 1 insertions, 1 deletions
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): | |||
| 125 | with open(args.error_file, 'r') as json_fp: | 125 | with open(args.error_file, 'r') as json_fp: |
| 126 | data = json_fp.read() | 126 | data = json_fp.read() |
| 127 | 127 | ||
| 128 | return data | 128 | return data.encode('utf-8') |
| 129 | 129 | ||
| 130 | 130 | ||
| 131 | def send_data(data, args): | 131 | def send_data(data, args): |
