send-error-report: encode data to bytes
PATCH 1/1 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 <[email protected]>
--- scripts/send-error-report | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/send-error-report +1 -1
@@ -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):
Signature · 1 line
2.1.4