Fix warning/error extraction. (#305)

This commit is contained in:
Felix Fontein 2022-03-14 21:01:35 +01:00 committed by GitHub
parent 48391d6755
commit ba5e6f89f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- "docker_compose - fix Python 3 type error when extracting warnings or errors from docker-compose's output (https://github.com/ansible-collections/community.docker/pull/305)."

View File

@ -587,8 +587,8 @@ def attempt_extract_errors(exc_str, stdout, stderr):
msg = 'unknown cause'
return {
'warnings': [w.encode('utf-8') for w in warnings],
'errors': [e.encode('utf-8') for e in errors],
'warnings': [to_native(w) for w in warnings],
'errors': [to_native(e) for e in errors],
'msg': msg,
'module_stderr': ''.join(stderr),
'module_stdout': ''.join(stdout)