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:
parent
fabd619070
commit
4589b67a44
1 changed files with 1 additions and 4 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue