lightsaile pep8

This commit is contained in:
carnal0wnage
2018-05-17 19:43:56 -04:00
parent eb6665c09b
commit 7f6ad7a02f
2 changed files with 6 additions and 6 deletions

View File

@@ -40,8 +40,8 @@ def lightsail_get_instances():
print('{} : (AuthFailure) when calling the Get Instances -- key is invalid or no permissions.' .format(AWS_ACCESS_KEY_ID)) print('{} : (AuthFailure) when calling the Get Instances -- key is invalid or no permissions.' .format(AWS_ACCESS_KEY_ID))
sys.exit() sys.exit()
elif e.response['Error']['Code'] == 'AccessDeniedException': elif e.response['Error']['Code'] == 'AccessDeniedException':
print('{} : (AccessDeniedException) no permissions.' .format(AWS_ACCESS_KEY_ID)) print('{} : (AccessDeniedException) no permissions.' .format(AWS_ACCESS_KEY_ID))
sys.exit() sys.exit()
else: else:
print(e) print(e)
@@ -49,10 +49,10 @@ def lightsail_get_instances():
print("[-] get_instances allowed for {} but no results [-]" .format(region)) print("[-] get_instances allowed for {} but no results [-]" .format(region))
else: else:
print("[+] Listing instances for region: {} [+]" .format(region)) print("[+] Listing instances for region: {} [+]" .format(region))
#db_logger = [] # db_logger = []
for r in response['instances']: for r in response['instances']:
# db_logger.append(['ec2', 'DescribeInstances', str(r), AWS_ACCESS_KEY_ID, target, datetime.datetime.now()]) # db_logger.append(['ec2', 'DescribeInstances', str(r), AWS_ACCESS_KEY_ID, target, datetime.datetime.now()])
#for i in r['Instances']: # for i in r['Instances']:
pp.pprint(r) pp.pprint(r)
# logging to db here # logging to db here
# try: # try: