tools: make print_table compatible with python2 and python3 tests
StringIO expect 'str' object, but on python2 it's different from 'unicode' (returned by decode() method). Convert it explicitly back to str.
This commit is contained in:
parent
e2481b19a2
commit
ad570ec027
@ -474,7 +474,7 @@ def print_table(table, stream=None):
|
||||
stdout=subprocess.PIPE)
|
||||
p.stdin.write(text_table.encode())
|
||||
(out, _) = p.communicate()
|
||||
stream.write(out.decode())
|
||||
stream.write(str(out.decode()))
|
||||
else:
|
||||
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
|
||||
p.communicate(text_table.encode())
|
||||
|
Loading…
Reference in New Issue
Block a user