From d5923ef7fabe2091ae6da5f0c2707ee110f8c7d1 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 26 Jun 2022 07:40:40 +0200 Subject: testsuite/gna/testsuite.py: add support for python3 --- testsuite/gna/testsuite.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testsuite/gna/testsuite.py b/testsuite/gna/testsuite.py index a27660d36..ec60a8339 100755 --- a/testsuite/gna/testsuite.py +++ b/testsuite/gna/testsuite.py @@ -15,7 +15,7 @@ class Job(object): def __init__(self, dirname, poll): self.dirname = dirname self.poll = poll - self.out = '' + self.out = b'' def start(self): self.p = subprocess.Popen( @@ -69,7 +69,10 @@ def run(keep): j.out += d for j in done: print('Finish: {}'.format(j.dirname)) - print(j.out) + s = j.out + if sys.version_info[0] >= 3: + s = s.decode('latin-1') + print(s) code = j.wait() if code != 0: print('############### Error for {}'.format(j.dirname)) -- cgit v1.2.3