vppinfra: test support python3 01/22801/2
authorOle Troan <ot@cisco.com>
Wed, 16 Oct 2019 23:53:47 +0000 (01:53 +0200)
committerOle Trøan <otroan@employees.org>
Thu, 17 Oct 2019 17:20:24 +0000 (17:20 +0000)
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id1794f38fcb776ded9b769141f5f47d7be75f247

test/framework.py

index c1bfaa7..2afa64c 100644 (file)
@@ -159,7 +159,8 @@ def pump_output(testclass):
         if testclass.vpp.stdout.fileno() in readable:
             read = os.read(testclass.vpp.stdout.fileno(), 102400)
             if len(read) > 0:
-                split = read.splitlines(True)
+                split = read.decode('ascii',
+                                    errors='backslashreplace').splitlines(True)
                 if len(stdout_fragment) > 0:
                     split[0] = "%s%s" % (stdout_fragment, split[0])
                 if len(split) > 0 and split[-1].endswith("\n"):