-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'NoneType' object has no attribute 'items' error from ec2_vpc_route_table_info #1668
Closed
1 task done
Comments
Files identified in the description:
If these files are inaccurate, please update the |
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Aug 1, 2023
Default filters to empty dictionary SUMMARY Changes the default for the filters option from None to an empty dictionary. Fixes: #1668 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_route_table_info ADDITIONAL INFORMATION This matches what other *info modules (e.g. ec2_vpc_endpoint_info or ec2_vpc_subnet_info) do for the filters option default. Reviewed-by: Alina Buzachis Reviewed-by: Brant Evans <bevans@redhat.com> Reviewed-by: Mark Chappell Reviewed-by: Mike Graves <mgraves@redhat.com>
patchback bot
pushed a commit
that referenced
this issue
Aug 1, 2023
Default filters to empty dictionary SUMMARY Changes the default for the filters option from None to an empty dictionary. Fixes: #1668 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_route_table_info ADDITIONAL INFORMATION This matches what other *info modules (e.g. ec2_vpc_endpoint_info or ec2_vpc_subnet_info) do for the filters option default. Reviewed-by: Alina Buzachis Reviewed-by: Brant Evans <bevans@redhat.com> Reviewed-by: Mark Chappell Reviewed-by: Mike Graves <mgraves@redhat.com> (cherry picked from commit 31c7506)
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Aug 1, 2023
[PR #1670/31c75069 backport][stable-6] Default filters to empty dictionary This is a backport of PR #1670 as merged into main (31c7506). SUMMARY Changes the default for the filters option from None to an empty dictionary. Fixes: #1668 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_route_table_info ADDITIONAL INFORMATION This matches what other *info modules (e.g. ec2_vpc_endpoint_info or ec2_vpc_subnet_info) do for the filters option default. Reviewed-by: Alina Buzachis
krisek
pushed a commit
to krisek/amazon.aws
that referenced
this issue
Aug 31, 2023
Default filters to empty dictionary SUMMARY Changes the default for the filters option from None to an empty dictionary. Fixes: ansible-collections#1668 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_route_table_info ADDITIONAL INFORMATION This matches what other *info modules (e.g. ec2_vpc_endpoint_info or ec2_vpc_subnet_info) do for the filters option default. Reviewed-by: Alina Buzachis Reviewed-by: Brant Evans <bevans@redhat.com> Reviewed-by: Mark Chappell Reviewed-by: Mike Graves <mgraves@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When gathering the route tables using the
ec2_vpc_route_table_info
module without any filters being provided always errors out with'NoneType' object has no attribute 'items'
.The error is due to the fact that line 263 sets the default for
filters
toNone
instead of an emptydict
.Other *info modules (e.g.
ec2_vpc_endpoint_info
orec2_vpc_subnet_info
) define the default forfilters
to be an emptydict
.A simple work-around is to add
filters: {}
to the module options, but the module should use a sane default.Issue Type
Bug Report
Component Name
ec2_vpc_route_table_info
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
RHEL 8 based execution environment targeting localhost to query the AWS APIs
Steps to Reproduce
Expected Results
I expected the playbook to run without a module error.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: