believe the last of the print issues should be fixed

This commit is contained in:
cktricky
2018-04-06 11:11:50 -10:00
parent f9e8d453ad
commit 3ae87d030a
5 changed files with 28 additions and 29 deletions

View File

@@ -22,13 +22,13 @@ def describe_stacks(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
)
response = client.describe_stacks()
#debug
print response
print(response)
if response.get('Stacks') is None:
print("{} likely does not have Lambda permissions\n" .format(AWS_ACCESS_KEY_ID))
elif len(response['Stacks']) <= 0:
print("[-] DescribeStacks allowed for {} but no results (everyone seems to have this permission) [-]\n" .format(region))
else: #THIS PART IS UNTESTED
for r in response['Stacks']:
for r in response['Stacks']:
pp.pprint(r)
except botocore.exceptions.EndpointConnectionError as e:
print("Unexpected error: {}" .format(e))