From 262c9ffdb6c995d67a8dfd3707ec8bb09a4fd77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Travassac?= Date: Mon, 15 Jul 2019 15:35:54 +0200 Subject: [PATCH] VMware: fix for vmware_guest_file_operation binary file (#57614) --- lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py b/lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py index c3dfcb850f0..f200424ca26 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py @@ -346,7 +346,7 @@ class VmwareGuestFileManager(PyVmomi): self.module.fail_json(msg="copy does not support copy of directory: %s" % src) data = None - with open(b_src, "r") as local_file: + with open(b_src, "rb") as local_file: data = local_file.read() file_size = os.path.getsize(b_src)