[gnome-continuous-yocto/gnomeostree-3.28-rocko: 618/8267] buildhistory_analysis: Convert stream data (bytes) to strings



commit e2e3fa4259840fa8d7738ab46e984062c7f65bb8
Author: Leonardo Sandoval <leonardo sandoval gonzalez linux intel com>
Date:   Wed May 25 04:19:34 2016 -0500

    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
    
    (From OE-Core rev: 3064d36186b47954eb94095217f7bb37e3fce651)
    
    Signed-off-by: Leonardo Sandoval <leonardo sandoval gonzalez linux intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/lib/oe/buildhistory_analysis.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 0dcd49f..16491a9 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)]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]