mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Fix various sonarcloud issues
This fixes various reported bugs through sonarcloud at: https://sonarcloud.io/project/issues?id=Rodney-Reis_ansible&resolved=false&types=BUG
This commit is contained in:
@@ -516,7 +516,6 @@ def recreate_tags_from_list(list_of_tags):
|
||||
"""
|
||||
tags = list()
|
||||
i = 0
|
||||
list_of_tags = list_of_tags
|
||||
for i in range(len(list_of_tags)):
|
||||
key_name = list_of_tags[i][0]
|
||||
key_val = list_of_tags[i][1]
|
||||
|
||||
@@ -113,7 +113,6 @@ def poll_reload_status(api_key=None, job_id=None, payload=None):
|
||||
if response.json()['error']:
|
||||
# the reload job was submitted but polling failed. Don't return this as an overall task failure.
|
||||
stderr = "Reload submitted successfully, but the Memset API returned a job error when attempting to poll the reload status."
|
||||
msg = msg
|
||||
else:
|
||||
memset_api = response.json()
|
||||
msg = None
|
||||
|
||||
@@ -187,8 +187,6 @@ def create_zone(args=None, zone_exists=None, payload=None):
|
||||
api_method = 'dns.zone_info'
|
||||
_has_failed, _msg, response = memset_api_call(api_key=args['api_key'], api_method=api_method, payload=payload)
|
||||
memset_api = response.json()
|
||||
else:
|
||||
msg = msg
|
||||
|
||||
return(has_failed, has_changed, memset_api, msg)
|
||||
|
||||
|
||||
@@ -588,7 +588,7 @@ class RHEVConn(object):
|
||||
setMsg(str(e))
|
||||
setFailed()
|
||||
return False
|
||||
elif int(DISK.size) < (1024 * 1024 * 1024 * int(disksize)):
|
||||
elif int(DISK.size) > (1024 * 1024 * 1024 * int(disksize)):
|
||||
setMsg("Shrinking disks is not supported")
|
||||
setMsg(str(e))
|
||||
setFailed()
|
||||
|
||||
Reference in New Issue
Block a user