Fix warning/error extraction. (#305) (#306)

(cherry picked from commit ba5e6f89f3)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2022-03-14 21:13:28 +01:00 committed by GitHub
parent fbecb247c8
commit d6121fce86
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

@ -586,8 +586,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)