1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

winrm - fix failure parsing for send input errors (#56245)

This commit is contained in:
Jordan Borean 2019-05-14 19:55:41 -04:00 committed by GitHub
parent 826b99d4bd
commit fd65f037f8
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:
- winrm - Fix issue when attempting to parse CLIXML on send input failure

View file

@ -481,8 +481,8 @@ class Connection(ConnectionBase):
except ValueError:
# stdout does not contain a return response, stdin input was a fatal error
stderr = to_bytes(response.std_err, encoding='utf-8')
if self.is_clixml(stderr):
stderr = self.parse_clixml_stream(stderr)
if stderr.startswith(b"#< CLIXML"):
stderr = _parse_clixml(stderr)
raise AnsibleError('winrm send_input failed; \nstdout: %s\nstderr %s'
% (to_native(response.std_out), to_native(stderr)))