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))
sys.exit()
elif e.response['Error']['Code'] == 'AccessDeniedException':
print('{} : (AccessDeniedException) no permissions.' .format(AWS_ACCESS_KEY_ID))
sys.exit()
print('{} : (AccessDeniedException) no permissions.' .format(AWS_ACCESS_KEY_ID))
sys.exit()
else:
print(e)
@@ -49,10 +49,10 @@ def lightsail_get_instances():
print("[-] get_instances allowed for {} but no results [-]" .format(region))
else:
print("[+] Listing instances for region: {} [+]" .format(region))
#db_logger = []
# db_logger = []
for r in response['instances']:
# 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)
# logging to db here
# try:
@@ -70,4 +70,4 @@ def lightsail_get_instances():
else:
print(e)
except KeyboardInterrupt:
print("CTRL-C received, exiting...")
print("CTRL-C received, exiting...")