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):
name = module.params.get('name')
session_id = module.params.get('id')
delay = module.params.get('delay')
checks = module.params.get('checks')
datacenter = module.params.get('datacenter')
node = module.params.get('node')
consul_client = get_consul_api(module)
changed = True
try:
@ -208,10 +206,9 @@ def remove_session(module):
remove a session.""")
consul_client = get_consul_api(module)
changed = False
try:
session = consul_client.session.destroy(session_id)
consul_client.session.destroy(session_id)
module.exit_json(changed=True,
session_id=session_id)