Fix pycodestyle E117 issues.

This commit is contained in:
Matt Clay
2019-02-13 18:39:26 -08:00
parent 7b8e814a10
commit 3e778d3f8f
40 changed files with 150 additions and 150 deletions

View File

@@ -1026,24 +1026,24 @@ class AzureRMAuth(object):
elif self.credentials.get('client_id') is not None and \
self.credentials.get('secret') is not None and \
self.credentials.get('tenant') is not None:
self.azure_credentials = ServicePrincipalCredentials(client_id=self.credentials['client_id'],
secret=self.credentials['secret'],
tenant=self.credentials['tenant'],
cloud_environment=self._cloud_environment,
verify=self._cert_validation_mode == 'validate')
self.azure_credentials = ServicePrincipalCredentials(client_id=self.credentials['client_id'],
secret=self.credentials['secret'],
tenant=self.credentials['tenant'],
cloud_environment=self._cloud_environment,
verify=self._cert_validation_mode == 'validate')
elif self.credentials.get('ad_user') is not None and \
self.credentials.get('password') is not None and \
self.credentials.get('client_id') is not None and \
self.credentials.get('tenant') is not None:
self.azure_credentials = self.acquire_token_with_username_password(
self._adfs_authority_url,
self._resource,
self.credentials['ad_user'],
self.credentials['password'],
self.credentials['client_id'],
self.credentials['tenant'])
self.azure_credentials = self.acquire_token_with_username_password(
self._adfs_authority_url,
self._resource,
self.credentials['ad_user'],
self.credentials['password'],
self.credentials['client_id'],
self.credentials['tenant'])
elif self.credentials.get('ad_user') is not None and self.credentials.get('password') is not None:
tenant = self.credentials.get('tenant')

View File

@@ -117,7 +117,7 @@ def dict_merge(a, b):
result = deepcopy(a)
for k, v in b.items():
if k in result and isinstance(result[k], dict):
result[k] = dict_merge(result[k], v)
result[k] = dict_merge(result[k], v)
else:
result[k] = deepcopy(v)
return result

View File

@@ -448,14 +448,14 @@ class LinuxHardware(Hardware):
def get_mount_info(self, mount, device, uuids):
mount_size = get_mount_size(mount)
mount_size = get_mount_size(mount)
# _udevadm_uuid is a fallback for versions of lsblk <= 2.23 that don't have --paths
# see _run_lsblk() above
# https://github.com/ansible/ansible/issues/36077
uuid = uuids.get(device, self._udevadm_uuid(device))
# _udevadm_uuid is a fallback for versions of lsblk <= 2.23 that don't have --paths
# see _run_lsblk() above
# https://github.com/ansible/ansible/issues/36077
uuid = uuids.get(device, self._udevadm_uuid(device))
return mount_size, uuid
return mount_size, uuid
def get_mount_facts(self):

View File

@@ -356,7 +356,7 @@ class MSOModule(object):
if not t:
self.module.fail_json(msg="Tenant '%s' is not valid tenant name." % tenant)
if 'id' not in t:
self.module.fail_json(msg="Tenant lookup failed for tenant '%s': %s" % (tenant, t))
self.module.fail_json(msg="Tenant lookup failed for tenant '%s': %s" % (tenant, t))
return t['id']
def lookup_users(self, users):