From 4c301bda5c88135c281c3d1e8a80306024566c98 Mon Sep 17 00:00:00 2001 From: Manuel Sousa Date: Thu, 14 May 2015 15:30:10 +0100 Subject: [PATCH] Make compatible with python Removed one line if else --- lib/ansible/modules/extras/messaging/rabbitmq_exchange.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py b/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py index ac2fee61812..8cd519032d7 100644 --- a/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py +++ b/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py @@ -130,7 +130,10 @@ def main(): details = r.text ) - changeRequired = not exchangeExists if module.params['state']=='present' else exchangeExists + if module.params['state']=='present': + changeRequired = not exchangeExists + else: + changeRequired = exchangeExists # Check if attributes change on existing exchange if not changeRequired and r.status_code==200 and module.params['state'] == 'present':