Skip to content

Commit

Permalink
Fix TypeError: 'NoneType' object is not subscriptable (#672) (#679)
Browse files Browse the repository at this point in the history
[PR #672/395b730c backport][stable-2] ec2_vpc_igw: fix 'NoneType' object is not subscriptable

This is a backport of PR #672 as merged into main (395b730).
SUMMARY

ec2_vpc_igw: fix 'NoneType' object is not subscriptable

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_vpc_igw
ADDITIONAL INFORMATION
  • Loading branch information
patchback[bot] authored Feb 17, 2022
1 parent a1959b8 commit 1646efa
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 1646efa

Please sign in to comment.