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

(cherry picked from commit f271d02a9f)

Co-authored-by: jakegatsby <39974194+jakegatsby@users.noreply.github.com>
This commit is contained in:
Jordan Borean 2021-02-08 09:56:59 +10:00 committed by GitHub
parent e75570ba83
commit bca57ec65a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -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: