]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
images: Decode http retrieve for older pythons
authorErfan Abdi <erfangplus@gmail.com>
Tue, 19 Oct 2021 02:39:01 +0000 (06:09 +0330)
committerErfan Abdi <erfangplus@gmail.com>
Tue, 19 Oct 2021 02:39:01 +0000 (06:09 +0330)
tools/helpers/images.py

index 36af1e6168de592fb3da99ff9f6071ec69260de4..8a5a38b22af93e5b59365e54750a6ac99bba7ee0 100644 (file)
@@ -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")