From: Martin Jansa Date: Thu, 29 Mar 2012 13:24:10 +0200 Subject: [PATCH] arfile: decode read lines as ascii string before getting fields from it * python3 returns them as byte sequence Signed-off-by: Martin Jansa --- arfile.py | 1 + 1 file changed, 1 insertion(+) 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 ]