mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
PEP8 E712 fixes (#21916)
This commit is contained in:
@@ -302,7 +302,7 @@ def package_latest(names, pkg_spec, module):
|
||||
# parse out a successful update above. This way we will report a
|
||||
# successful run when we actually modify something but fail
|
||||
# otherwise.
|
||||
if pkg_spec[name]['changed'] != True:
|
||||
if pkg_spec[name]['changed'] is not True:
|
||||
if pkg_spec[name]['stderr']:
|
||||
pkg_spec[name]['rc'] = 1
|
||||
|
||||
@@ -614,7 +614,7 @@ def main():
|
||||
else:
|
||||
combined_error_message = pkg_spec[n]['stdout']
|
||||
|
||||
if pkg_spec[n]['changed'] == True:
|
||||
if pkg_spec[n]['changed'] is True:
|
||||
combined_changed = True
|
||||
|
||||
# If combined_error_message contains anything at least some part of the
|
||||
|
||||
@@ -155,7 +155,7 @@ def main():
|
||||
else:
|
||||
installed = False
|
||||
|
||||
if ( state == 'present' or state == 'latest' ) and installed == False:
|
||||
if ( state == 'present' or state == 'latest' ) and installed is False:
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=True)
|
||||
rc, output = install_package(module, depot, name)
|
||||
@@ -167,7 +167,7 @@ def main():
|
||||
else:
|
||||
module.fail_json(name=name, msg=output, rc=rc)
|
||||
|
||||
elif state == 'latest' and installed == True:
|
||||
elif state == 'latest' and installed is True:
|
||||
#Check depot version
|
||||
rc, version_depot = query_package(module, name, depot)
|
||||
|
||||
@@ -189,7 +189,7 @@ def main():
|
||||
output = "Software package not in repository " + depot
|
||||
module.fail_json(name=name, msg=output, rc=rc)
|
||||
|
||||
elif state == 'absent' and installed == True:
|
||||
elif state == 'absent' and installed is True:
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=True)
|
||||
rc, output = remove_package(module, name)
|
||||
|
||||
Reference in New Issue
Block a user