From 861fdfc5ba24e81b46932225afce0a430870c2b2 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sun, 16 Aug 2015 02:19:43 -0400 Subject: [PATCH] updated callbacks to properly test diff no matter if dict or list --- lib/ansible/plugins/callback/default.py | 2 +- lib/ansible/plugins/callback/minimal.py | 2 +- lib/ansible/plugins/callback/skippy.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/plugins/callback/default.py b/lib/ansible/plugins/callback/default.py index 2e4646264fc..c9631379683 100644 --- a/lib/ansible/plugins/callback/default.py +++ b/lib/ansible/plugins/callback/default.py @@ -110,7 +110,7 @@ class CallbackModule(CallbackBase): self._display.banner(msg) def v2_on_file_diff(self, result): - if 'diff' in result._result and result._result['diff'] != {}: + if 'diff' in result._result and result._result['diff']: self._display.display(self._get_diff(result._result['diff'])) def v2_playbook_item_on_ok(self, result): diff --git a/lib/ansible/plugins/callback/minimal.py b/lib/ansible/plugins/callback/minimal.py index d03a023605e..60c0ddbfe85 100644 --- a/lib/ansible/plugins/callback/minimal.py +++ b/lib/ansible/plugins/callback/minimal.py @@ -77,5 +77,5 @@ class CallbackModule(CallbackBase): self._display.display("%s | UNREACHABLE!" % result._host.get_name(), color='yellow') def v2_on_file_diff(self, result): - if 'diff' in result._result and result._result['diff'] != {}: + if 'diff' in result._result and result._result['diff']: self._display.display(self._get_diff(result._result['diff'])) diff --git a/lib/ansible/plugins/callback/skippy.py b/lib/ansible/plugins/callback/skippy.py index 4307298b495..4502da0a63d 100644 --- a/lib/ansible/plugins/callback/skippy.py +++ b/lib/ansible/plugins/callback/skippy.py @@ -103,7 +103,7 @@ class CallbackModule(CallbackBase): self._display.banner(msg) def v2_on_file_diff(self, result): - if 'diff' in result._result and result._result['diff'] != {}: + if 'diff' in result._result and result._result['diff']: self._display.display(self._get_diff(result._result['diff'])) def v2_playbook_item_on_ok(self, result):