winrm - fix failure parsing for send input errors (#56245)
This commit is contained in:
parent
826b99d4bd
commit
fd65f037f8
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/winrm-input-failures.yaml
Normal file
2
changelogs/fragments/winrm-input-failures.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- winrm - Fix issue when attempting to parse CLIXML on send input failure
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in a new issue