Pep8 fixes for rabbitmq modules (#24590)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-08-10 15:27:11 +05:30 committed by René Moser
parent 85fc4c67ef
commit f7321a87ca
9 changed files with 192 additions and 207 deletions

View file

@ -123,24 +123,22 @@ def main():
tracing = module.params['tracing']
state = module.params['state']
node = module.params['node']
result = dict(changed=False, name=name, state=state)
rabbitmq_vhost = RabbitMqVhost(module, name, tracing, node)
changed = False
if rabbitmq_vhost.get():
if state == 'absent':
rabbitmq_vhost.delete()
changed = True
result['changed'] = True
else:
if rabbitmq_vhost.set_tracing():
changed = True
result['changed'] = True
elif state == 'present':
rabbitmq_vhost.add()
rabbitmq_vhost.set_tracing()
changed = True
module.exit_json(changed=changed, name=name, state=state)
result['changed'] = True
module.exit_json(**result)
if __name__ == '__main__':
main()