Fix docker_service python3 incompatibility

Looks like this is supposed to operate on native strings so there's no
need to encode or decode at all here

Fixes #30354
pull/30758/head
Toshio Kuratomi 7 years ago
parent dc8aedb274
commit f66c74915c

@ -520,7 +520,7 @@ def get_redirected_output(path_name):
with open(path_name, 'r') as fd: with open(path_name, 'r') as fd:
for line in fd: for line in fd:
# strip terminal format/color chars # strip terminal format/color chars
new_line = re.sub(r'\x1b\[.+m', '', line.encode('ascii')) new_line = re.sub(r'\x1b\[.+m', '', line)
output.append(new_line) output.append(new_line)
fd.close() fd.close()
os.remove(path_name) os.remove(path_name)

Loading…
Cancel
Save