From 2a644ab3977650988b7bfc1b69cb53668f048ec7 Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Sun, 22 Mar 2020 08:33:31 +0530 Subject: [PATCH] Don't write playbook stats in binary mode Don't write the json string in binary mode. Change-Id: I5e68b1f1de64a4c199fa1764e1dbe4d8c36973f6 Task: 39122 (cherry picked from commit a0e13193c57a9c7f42741e7ceb9e50545bdd54f8) --- callback_plugins/validation_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/callback_plugins/validation_json.py b/callback_plugins/validation_json.py index b891f8697..d78f1cd60 100644 --- a/callback_plugins/validation_json.py +++ b/callback_plugins/validation_json.py @@ -151,7 +151,7 @@ class CallbackModule(CallbackBase): self.env['playbook_name'], self.current_time) - with open(log_file, 'wb') as js: + with open(log_file, 'w') as js: js.write(json.dumps(output, cls=AnsibleJSONEncoder, indent=4,