diff options
author | Matt Martz <matt@sivel.net> | 2017-05-17 16:26:32 -0500 |
---|---|---|
committer | Matt Davis <mdavis@ansible.com> | 2017-05-18 16:11:04 -0700 |
commit | 7849e595b146eb6d45e8c033057f4fac4eb67d63 (patch) | |
tree | 052f8440bc6c691edb3ffddbb7f96f5df3889c92 /lib/ansible/plugins | |
parent | 4542e83fa011f876ef57498b9e0c1aeb1d082b93 (diff) | |
download | ansible-7849e595b146eb6d45e8c033057f4fac4eb67d63.tar.gz |
Base changes required to allow winrm to work on py3 (#24744)
(cherry picked from commit e7d8ebf08038c672a6f9397cc9b9a66465af5547)
Diffstat (limited to 'lib/ansible/plugins')
-rw-r--r-- | lib/ansible/plugins/connection/winrm.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/plugins/connection/winrm.py b/lib/ansible/plugins/connection/winrm.py index 15944654d6..d452be5afd 100644 --- a/lib/ansible/plugins/connection/winrm.py +++ b/lib/ansible/plugins/connection/winrm.py @@ -394,11 +394,11 @@ class Connection(ConnectionBase): return (result.status_code, result.std_out, result.std_err) def is_clixml(self, value): - return value.startswith("#< CLIXML") + return value.startswith(b"#< CLIXML") # hacky way to get just stdout- not always sure of doc framing here, so use with care def parse_clixml_stream(self, clixml_doc, stream_name='Error'): - clear_xml = clixml_doc.replace('#< CLIXML\r\n', '') + clear_xml = clixml_doc.replace(b'#< CLIXML\r\n', b'') doc = xmltodict.parse(clear_xml) lines = [l.get('#text', '').replace('_x000D__x000A_', '') for l in doc.get('Objs', {}).get('S', {}) if l.get('@S') == stream_name] return '\r\n'.join(lines) |