[yocto] [opkg-utils][PATCH 08/22] arfile: decode read lines as ascii string before getting fields from it

Martin Jansa martin.jansa at gmail.com
Thu Mar 29 15:22:42 PDT 2012


* python3 returns them as byte sequence

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 arfile.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arfile.py b/arfile.py
index 7a695c6..92ffee0 100644
--- a/arfile.py
+++ b/arfile.py
@@ -74,6 +74,7 @@ class ArFile:
             if l == "\n":
                 l = self.f.readline()
                 if not l: break
+            l = l.decode('ascii')
             l = l.replace('`', '')
             # Field lengths from /usr/include/ar.h:
             ar_field_lens = [ 16, 12, 6, 6, 8, 10, 2 ]
-- 
1.7.8.5




More information about the yocto mailing list