Properly match existing security group

If we don't care about `vpc_id` then neither should the code.
This commit is contained in:
Patryk Zawadzki 2014-02-26 13:39:03 +01:00
parent 6fa898c511
commit da1efee21f

View file

@ -146,7 +146,7 @@ def main():
groups[curGroup.id] = curGroup
groups[curGroup.name] = curGroup
if curGroup.name == name and curGroup.vpc_id == vpc_id:
if curGroup.name == name and (vpc_id is None or curGroup.vpc_id == vpc_id):
group = curGroup
# Ensure requested group is absent