Jose Diaz-Gonzalez

Fix retrieval of resources when user is using statements

...@@ -48,7 +48,7 @@ class Policy(object): ...@@ -48,7 +48,7 @@ class Policy(object):
48 document = {'Version': '2012-10-17'} 48 document = {'Version': '2012-10-17'}
49 statements = [] 49 statements = []
50 document['Statement'] = statements 50 document['Statement'] = statements
51 - for resource in self.config['policy']['resources']: 51 + for resource in self.config['policy'].get('resources', []):
52 arn = resource['arn'] 52 arn = resource['arn']
53 _, _, service, _ = arn.split(':', 3) 53 _, _, service, _ = arn.split(':', 3)
54 statement = {"Effect": "Allow", 54 statement = {"Effect": "Allow",
......