Merge pull request #2611 from hosiet/patch-1

tests/test.py: Make script compatible with python3
This commit is contained in:
Max Lv
2020-02-01 07:39:34 +08:00
committed by GitHub
+4 -2
View File
@@ -103,8 +103,10 @@ try:
if stage == 4 and fd == p4.stdout:
stage = 5
if bytes != str:
line = str(line, 'utf8')
sys.stderr.write(line)
line = bytes(line)
sys.stderr.buffer.write(line)
else:
sys.stderr.write(line)
if stage == 3 and p3 is not None:
fdset.remove(p3.stdout)