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:
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):
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue