PEP8 E712 fixes (#21916)

This commit is contained in:
Matt Martz 2017-02-24 16:49:43 -06:00 committed by GitHub
commit 305c88700d
34 changed files with 103 additions and 123 deletions

View file

@ -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

View file

@ -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)