mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 06:11:07 -07:00
Enable additional pylint rules and resolve issues found. (#47221)
* Resolve unneeded-not. * Resolve global-at-module-level. * Resolve useless-import-alias. * Resolve bad-whitespace. * Resolve global-variable-not-assigned. * Resolve logging-not-lazy. * Resolve comparison-with-itself.
This commit is contained in:
parent
77d32b8f57
commit
37b013aca3
29 changed files with 42 additions and 53 deletions
|
@ -249,18 +249,18 @@ def main():
|
|||
# if state is present (default), then add the script
|
||||
if state == "present":
|
||||
results = set_script(fmg, script_name, script_type, script_content, script_description, script_target, adom)
|
||||
if not results[0] == 0:
|
||||
if results[0] != 0:
|
||||
if isinstance(results[1], list):
|
||||
module.fail_json(msg="Adding Script Failed", **results)
|
||||
else:
|
||||
module.fail_json(msg="Adding Script Failed")
|
||||
elif state == "execute":
|
||||
results = execute_script(fmg, script_name, script_scope, script_package, adom, vdom)
|
||||
if not results[0] == 0:
|
||||
if results[0] != 0:
|
||||
module.fail_json(msg="Script Execution Failed", **results)
|
||||
elif state == "delete":
|
||||
results = delete_script(fmg, script_name, adom)
|
||||
if not results[0] == 0:
|
||||
if results[0] != 0:
|
||||
module.fail_json(msg="Script Deletion Failed", **results)
|
||||
|
||||
fmg.logout()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue