From 96ce54315056ddba15b67d943a3778181b765bce Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Tue, 10 May 2016 15:28:50 +0300 Subject: bitbake: toaster: use decode('utf-8') for binary data Decoded binary data to utf-8 to fix the following error when runnign on python 3: TypeError: Type str doesn't support the buffer API [YOCTO #9584] (Bitbake rev: 752ea00919ef054622a51ce097923309934eff2b) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/toaster/orm') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 9183b0cd7c..58dc753aef 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1169,7 +1169,7 @@ class LayerIndexLayerSource(LayerSource): except URLError as e: raise Exception("Failed to read %s: %s" % (path, e.reason)) - return json.loads(res.read()) + return json.loads(res.read().decode('utf-8')) # verify we can get the basic api try: -- cgit v1.2.3-54-g00ecf