From 63c6afeaeea88437823d59d1010132759b538bd4 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 21 Sep 2017 05:07:49 +0200 Subject: [PATCH] Fix PEP8 issue --- lib/ansible/plugins/callback/mail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/callback/mail.py b/lib/ansible/plugins/callback/mail.py index a0cab5742d..8f1c4a9cdf 100644 --- a/lib/ansible/plugins/callback/mail.py +++ b/lib/ansible/plugins/callback/mail.py @@ -100,7 +100,7 @@ class CallbackModule(CallbackBase): # Add subject if self.itembody: subject = self.itemsubject - elif result._result.get('failed_when_result') == True: + elif result._result.get('failed_when_result') is True: subject = "Failed due to 'failed_when' condition" elif result._result.get('exception'): subject = self.subject_msg(result._result['exception'], failtype, -1) @@ -134,7 +134,7 @@ class CallbackModule(CallbackBase): # Add item / message if self.itembody: body += self.itembody - elif result._result.get('failed_when_result') == True: + elif result._result.get('failed_when_result') is True: body += "due to the following condition:\n\n" + self.indent('failed_when:\n- ' + '\n- '.join(result._task.failed_when)) + '\n\n' elif result._result.get('msg'): body += self.body_blob(result._result['msg'], 'message')