Fixes multiple lgtm issues (#45629)

Most of the issues were just inclusions of code that were not used.
This cleans those up. Other alerts were semi-false-positives for now
This commit is contained in:
Tim Rupp 2018-09-13 15:26:17 -04:00 committed by GitHub
commit e619052424
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 255 additions and 239 deletions

View file

@ -95,7 +95,6 @@ import socket
import time
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six import string_types
from distutils.version import LooseVersion
try:
@ -582,8 +581,10 @@ def main():
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)
exit_json(module, results, client)
except F5ModuleError as ex:
cleanup_tokens(client)
fail_json(module, ex, client)