Skip to content

Commit

Permalink
ec2_vpc_vgw - fix call to parent static method in class VGWRetry (#2140
Browse files Browse the repository at this point in the history
…) (#2141)

This is a backport of PR #2140 as merged into main (87e2152).
SUMMARY

When trying to create a VPN virtual gateway with a non-existent VPC id, module fails incorrectly with the following error
\\"/tmp/ansible_community.aws.ec2_vpc_vgw_payload_t4kolii1/ansible_community.aws.ec2_vpc_vgw_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vgw.py\\", line 173, in found\\nTypeError: super(type, obj): obj must be an instance or subtype of type

The fix consists in adding argument to super()

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_vpc_vgw

Reviewed-by: Mark Chappell
Reviewed-by: Bikouo Aubin
  • Loading branch information
patchback[bot] authored Sep 9, 2024
1 parent 880d453 commit 4ccc0bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- ec2_vpc_vgw - Fix call to parent static method in class ``VGWRetry`` (https://github.com/ansible-collections/community.aws/pull/2140).
2 changes: 1 addition & 1 deletion plugins/modules/ec2_vpc_vgw.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def found(response_code, catch_extra_error_codes=None):
response_code = (response_code,)

for code in response_code:
if super().found(response_code, catch_extra_error_codes):
if super(VGWRetry, VGWRetry).found(response_code, catch_extra_error_codes):
return True

return False
Expand Down

0 comments on commit 4ccc0bd

Please sign in to comment.