PEP8 fixes
This commit is contained in:
parent
6c9cb05cfd
commit
f35975f114
1 changed files with 3 additions and 3 deletions
|
@ -276,7 +276,7 @@ class AzureRM(object):
|
||||||
elif self.credentials.get('ad_user') is not None and self.credentials.get('password') is not None:
|
elif self.credentials.get('ad_user') is not None and self.credentials.get('password') is not None:
|
||||||
tenant = self.credentials.get('tenant')
|
tenant = self.credentials.get('tenant')
|
||||||
if tenant is not None:
|
if tenant is not None:
|
||||||
self.azure_credentials = UserPassCredentials(self.credentials['ad_user'], self.credentials['password'], tenant=tenant)
|
self.azure_credentials = UserPassCredentials(self.credentials['ad_user'], self.credentials['password'], tenant=tenant)
|
||||||
else:
|
else:
|
||||||
self.azure_credentials = UserPassCredentials(self.credentials['ad_user'], self.credentials['password'])
|
self.azure_credentials = UserPassCredentials(self.credentials['ad_user'], self.credentials['password'])
|
||||||
else:
|
else:
|
||||||
|
@ -490,8 +490,7 @@ class AzureInventory(object):
|
||||||
try:
|
try:
|
||||||
virtual_machines = self._compute_client.virtual_machines.list(resource_group)
|
virtual_machines = self._compute_client.virtual_machines.list(resource_group)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
sys.exit("Error: fetching virtual machines for resource group {0} - {1}".format(resource_group,
|
sys.exit("Error: fetching virtual machines for resource group {0} - {1}".format(resource_group, str(exc)))
|
||||||
str(exc)))
|
|
||||||
if self._args.host or self.tags:
|
if self._args.host or self.tags:
|
||||||
selected_machines = self._selected_machines(virtual_machines)
|
selected_machines = self._selected_machines(virtual_machines)
|
||||||
self._load_machines(selected_machines)
|
self._load_machines(selected_machines)
|
||||||
|
@ -802,5 +801,6 @@ def main():
|
||||||
|
|
||||||
AzureInventory()
|
AzureInventory()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in a new issue