mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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
This commit is contained in:
@@ -520,7 +520,7 @@ def get_redirected_output(path_name):
|
||||
with open(path_name, 'r') as fd:
|
||||
for line in fd:
|
||||
# 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)
|
||||
fd.close()
|
||||
os.remove(path_name)
|
||||
|
||||
Reference in New Issue
Block a user