PEP 8 cleanup. (#20789)

* PEP 8 E703 cleanup.
* PEP 8 E701 cleanup.
* PEP 8 E711 cleanup.
* PEP 8 W191 and E101 cleanup.
This commit is contained in:
Matt Clay
2017-01-28 00:12:11 -08:00
committed by GitHub
parent c29d1e3162
commit d0d1158c5e
72 changed files with 184 additions and 174 deletions

View File

@@ -270,9 +270,9 @@ def create_virtual_instance(module):
# Check if OS or Image Template is provided (Can't be both, defaults to OS)
if (module.params.get('os_code') != None and module.params.get('os_code') != ''):
if (module.params.get('os_code') is not None and module.params.get('os_code') != ''):
module.params['image_id'] = ''
elif (module.params.get('image_id') != None and module.params.get('image_id') != ''):
elif (module.params.get('image_id') is not None and module.params.get('image_id') != ''):
module.params['os_code'] = ''
module.params['disks'] = [] # Blank out disks since it will use the template
else:
@@ -302,7 +302,7 @@ def create_virtual_instance(module):
post_uri = module.params.get('post_uri'),
tags = tags)
if instance != None and instance['id'] > 0:
if instance is not None and instance['id'] > 0:
return True, instance
else:
return False, None
@@ -325,7 +325,7 @@ def wait_for_instance(module,id):
def cancel_instance(module):
canceled = True
if module.params.get('instance_id') == None and (module.params.get('tags') or module.params.get('hostname') or module.params.get('domain')):
if module.params.get('instance_id') is None and (module.params.get('tags') or module.params.get('hostname') or module.params.get('domain')):
tags = module.params.get('tags')
if isinstance(tags, basestring):
tags = [module.params.get('tags')]