]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake-layers: fix layerindex-fetch for Python 3
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 20 Mar 2017 04:07:04 +0000 (17:07 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Mar 2017 11:35:22 +0000 (11:35 +0000)
The data we read from an HTTPConnection comes in the form of bytes, but
we need it as a string, so in Python 3 we need to decode it (missed in
the Python 3 migration).

(Bitbake rev: 7e6a3cd1472e1a1c8304b46611e1676914a68b59)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bblayers/layerindex.py

index 013e952f38f1aab90004bb417f530e8118263b87..506c1109de61aeb66fe0b77e2af6d7b4ad889df6 100644 (file)
@@ -56,7 +56,7 @@ class LayerIndexPlugin(ActionPlugin):
         r = conn.getresponse()
         if r.status != 200:
             raise Exception("Failed to read " + path + ": %d %s" % (r.status, r.reason))
-        return json.loads(r.read())
+        return json.loads(r.read().decode())
 
     def get_layer_deps(self, layername, layeritems, layerbranches, layerdependencies, branchnum, selfname=False):
         def layeritems_info_id(items_name, layeritems):