Skip to content

Commit

Permalink
Fix TypeError: 'NoneType' object is not subscriptable (ansible-collec…
Browse files Browse the repository at this point in the history
…tions#672)

ec2_vpc_igw: fix 'NoneType' object is not subscriptable

SUMMARY

ec2_vpc_igw: fix 'NoneType' object is not subscriptable

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_vpc_igw
ADDITIONAL INFORMATION

Reviewed-by: Jill R <None>
Reviewed-by: Joseph Torcasso <None>
  • Loading branch information
alinabuzachis authored Feb 16, 2022
1 parent 92e04c1 commit 395b730
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/modules/ec2_vpc_igw.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ def ensure_igw_present(self, vpc_id, tags, purge_tags):
self._connection, self._module, igw['internet_gateway_id'],
resource_type='internet-gateway', tags=tags, purge_tags=purge_tags
)
igw_info = self.get_igw_info(self.get_matching_igw(vpc_id), vpc_id)
igw = self.get_matching_igw(vpc_id)
igw_info = self.get_igw_info(igw, vpc_id)
self._results.update(igw_info)

return self._results
Expand Down

0 comments on commit 395b730

Please sign in to comment.