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
ec2 inventory: python 3.7 compatibility #43716
Conversation
ec2 inventory script was throwing errors when using Python 3.7: TypeError: option values must be strings This changes the None ConfigParser options to empty strings instead.
What about adding |
Sure, that can work too I guess. Although I see now that there was already a mix of empty strings and None, for instance:
So maybe best to pick one or the other and make it consistent? |
Any feedback on this? |
We ran into the same issue today. Can we fix this please? |
Until the fix is available, try replacing:
with
in |
Happy to finish this PR one way or another, but need some feedback from somebody that has magic merge powers... @dagwieers I'm sure you're still lurking about somewhere? :) |
Well, I wouldn't know if this is the right fix, or if @madhead 's suggestion is a better idea, honestly. |
Merged, thanks for the fix (and apology for the delay reviewing/merging) |
ec2 inventory script was throwing errors when using Python 3.7: TypeError: option values must be strings This changes the None ConfigParser options to empty strings instead. (cherry picked from commit 505ce6c)
Raised a backport request to get this into upcoming 2.7 release (otherwise it would wait until 2.8) |
ec2 inventory script was throwing errors when using Python 3.7: TypeError: option values must be strings This changes the None ConfigParser options to empty strings instead. (cherry picked from commit 505ce6c)
SUMMARY
ec2 inventory script was throwing errors when using Python 3.7:
This changes the ConfigParser options that hava a None value to empty strings instead.
ISSUE TYPE
COMPONENT NAME
contrib ec2 dynamic inventory
ANSIBLE VERSION
ADDITIONAL INFORMATION
N/A