lightsaile pep8
This commit is contained in:
@@ -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...")
|
||||
|
||||
@@ -10,4 +10,4 @@ def module_lightsail_get_instances():
|
||||
Lightsail get_instances
|
||||
python3 weirdAAL.py -m lightsail_get_instances -t demo
|
||||
'''
|
||||
lightsail_get_instances()
|
||||
lightsail_get_instances()
|
||||
|
||||
Reference in New Issue
Block a user