cloud/elasticache: Ensure self.data is iterable
- self.data['SecurityGroups'] can return None causing traceback, if that is the case fallback to an empty list
This commit is contained in:
parent
b0556ab1fb
commit
db92301b00
1 changed files with 2 additions and 1 deletions
|
@ -395,7 +395,8 @@ class ElastiCacheManager(object):
|
||||||
|
|
||||||
# check vpc security groups
|
# check vpc security groups
|
||||||
vpc_security_groups = []
|
vpc_security_groups = []
|
||||||
for sg in self.data['SecurityGroups']:
|
security_groups = self.data['SecurityGroups'] or []
|
||||||
|
for sg in security_groups:
|
||||||
vpc_security_groups.append(sg['SecurityGroupId'])
|
vpc_security_groups.append(sg['SecurityGroupId'])
|
||||||
if set(vpc_security_groups) - set(self.security_group_ids):
|
if set(vpc_security_groups) - set(self.security_group_ids):
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue