From 9f673e0725d71f9a2ce7b4b7f2f2d3cd2f31aff8 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Mon, 3 Oct 2016 11:38:24 -0400 Subject: [PATCH] open anziballs payload 'wb' for py3 --- lib/ansible/executor/module_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/executor/module_common.py b/lib/ansible/executor/module_common.py index 28245be6e33..41b57b5fcbe 100644 --- a/lib/ansible/executor/module_common.py +++ b/lib/ansible/executor/module_common.py @@ -212,12 +212,12 @@ def debug(command, zipped_mod, json_params): directory = os.path.dirname(dest_filename) if not os.path.exists(directory): os.makedirs(directory) - f = open(dest_filename, 'w') + f = open(dest_filename, 'wb') f.write(z.read(filename)) f.close() # write the args file - f = open(args_path, 'w') + f = open(args_path, 'wb') f.write(json_params) f.close()