1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove unused variables

Session_id is unused in update_session, changed is always specifically
set in all exit_json call, and consul_client.session.destroy return True
or False, and is unused later (nor checked)
This commit is contained in:
Michael Scherer 2016-02-24 12:17:44 +01:00 committed by Matt Clay
parent fabd619070
commit 4589b67a44

View file

@ -172,14 +172,12 @@ def lookup_sessions(module):
def update_session(module): def update_session(module):
name = module.params.get('name') name = module.params.get('name')
session_id = module.params.get('id')
delay = module.params.get('delay') delay = module.params.get('delay')
checks = module.params.get('checks') checks = module.params.get('checks')
datacenter = module.params.get('datacenter') datacenter = module.params.get('datacenter')
node = module.params.get('node') node = module.params.get('node')
consul_client = get_consul_api(module) consul_client = get_consul_api(module)
changed = True
try: try:
@ -208,10 +206,9 @@ def remove_session(module):
remove a session.""") remove a session.""")
consul_client = get_consul_api(module) consul_client = get_consul_api(module)
changed = False
try: try:
session = consul_client.session.destroy(session_id) consul_client.session.destroy(session_id)
module.exit_json(changed=True, module.exit_json(changed=True,
session_id=session_id) session_id=session_id)