From: Leonardo Sandoval Date: Wed, 25 May 2016 09:19:34 +0000 (-0500) Subject: buildhistory_analysis: Convert stream data (bytes) to strings X-Git-Tag: uninative-1.3~856 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=3064d36186b47954eb94095217f7bb37e3fce651;p=openembedded-core.git buildhistory_analysis: Convert stream data (bytes) to strings The bytes type variables are threat different as strings variables in python3, so convert bytes to strings. This was found when using the script buildhistory-diff, where the interpreter was yielding this error TypeError: Type str doesn't support the buffer API Signed-off-by: Leonardo Sandoval Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index 0dcd49f4f1..16491a96e1 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py @@ -190,7 +190,7 @@ class FileChange: def blob_to_dict(blob): - alines = blob.data_stream.read().splitlines() + alines = [line.decode() for line in blob.data_stream.read().splitlines()] adict = {} for line in alines: splitv = [i.strip() for i in line.split('=',1)]