bugfix: use to_text(stdout) in psrp.Connection.put_file method (#73491) - 2.9 (#73495)

* bugfix: use to_text(stdout) in psrp.Connection.put_file method (#73491)

Co-authored-by: jakegatsby <jakegatsby@example.com>
(cherry picked from commit f271d02a9f)
pull/73493/head
Jordan Borean 5 years ago committed by GitHub
parent d268891703
commit e9838486bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- psrp connection plugin - ``to_text(stdout)`` before json.loads in psrp.Connection.put_file in case stdout is bytes.

@ -470,7 +470,7 @@ class Connection(ConnectionBase):
if rc != 0:
raise AnsibleError(to_native(stderr))
put_output = json.loads(stdout)
put_output = json.loads(to_text(stdout))
remote_sha1 = put_output.get("sha1")
if not remote_sha1:

Loading…
Cancel
Save