From 2ffd66ba5682212fd0c92bb570b538caf894e0b3 Mon Sep 17 00:00:00 2001 From: Erfan Abdi Date: Tue, 19 Oct 2021 06:09:01 +0330 Subject: [PATCH] images: Decode http retrieve for older pythons --- tools/helpers/images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/helpers/images.py b/tools/helpers/images.py index 36af1e6..8a5a38b 100644 --- a/tools/helpers/images.py +++ b/tools/helpers/images.py @@ -26,7 +26,7 @@ def get(args): if system_request[0] != 200: raise ValueError( "Failed to get system OTA channel: {}, error: {}".format(args.system_ota, system_request[0])) - system_responses = json.loads(system_request[1])["response"] + system_responses = json.loads(system_request[1].decode('utf8'))["response"] if len(system_responses) < 1: raise ValueError("No images found on system channel") @@ -51,7 +51,7 @@ def get(args): if vendor_request[0] != 200: raise ValueError( "Failed to get vendor OTA channel: {}, error: {}".format(vendor_ota, vendor_request[0])) - vendor_responses = json.loads(vendor_request[1])["response"] + vendor_responses = json.loads(vendor_request[1].decode('utf8'))["response"] if len(vendor_responses) < 1: raise ValueError("No images found on vendor channel") -- 2.47.3