PEP8 E712 fixes (#21916)

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

View File

@@ -204,7 +204,7 @@ def main():
changed = False
if operation == 'create':
if slb_server_exists == False:
if slb_server_exists is False:
result = axapi_call_v3(module, axapi_base_url+'slb/server/', method='POST', body=json.dumps(json_post), signature=signature)
if axapi_failure(result):
module.fail_json(msg="failed to create the server: %s" % result['response']['err']['msg'])

View File

@@ -210,7 +210,7 @@ def main():
kickstart_image_file):
changed = True
if not module.check_mode and changed == True:
if not module.check_mode and changed is True:
set_boot_options(module,
system_image_file,
kickstart=kickstart_image_file)

View File

@@ -680,7 +680,7 @@ def main():
commands.append(defaults)
elif state == 'absent':
if existing.get('sparse') == True:
if existing.get('sparse') is True:
delta['sparse'] = False
# defaults is a list of commands
defaults = config_pim_interface_defaults(existing, jp_bidir, isauth)

View File

@@ -300,12 +300,12 @@ def get_commands_to_config_vpc(module, vpc, domain, existing):
' source {1} vrf {2}'.format(pkl_dest, pkl_src, pkl_vrf))
commands.append(pkl_command)
if vpc.get('auto_recovery') == False:
if vpc.get('auto_recovery') is False:
vpc['auto_recovery'] = 'no'
else:
vpc['auto_recovery'] = ''
if vpc.get('peer_gw') == False:
if vpc.get('peer_gw') is False:
vpc['peer_gw'] = 'no'
else:
vpc['peer_gw'] = ''

View File

@@ -209,7 +209,7 @@ def main():
# Verify that we receive a community when using snmp v2
if m_args['version'] == "v2" or m_args['version'] == "v2c":
if m_args['community'] == False:
if m_args['community'] is False:
module.fail_json(msg='Community not set when using snmp version 2')
if m_args['version'] == "v3":