-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Fix getheaders regression with open_url in Scaleway dynamic inventory #48671
Conversation
Hi @sieben, thank you for submitting this pull-request! |
@@ -113,7 +113,7 @@ def _fetch_information(token, url): | |||
except KeyError: | |||
raise AnsibleError("Incorrect format from the Scaleway API response") | |||
|
|||
link = response.getheader('Link') | |||
link = response.headers['Link'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a difference between py2/py3. Your change will work fine in both, and it still supports case insensitive key lookups.
Just for educational purposes, the getheader
method exists at the following locations in py2/py3:
py2
response.headers.getheader
py3
response.getheader
@sivel Could you merge it? |
LGTM |
please remove me from CC in Ansible issues and stop sending me notification emails. |
@hekonsek Remove yourself from this line https://github.com/ansible/ansible/blob/devel/.github/BOTMETA.yml#L1147 |
Shipit |
@sieben I assume this should be backported, and to do so we will need a changelog fragment added in |
36554a7
to
e47d68e
Compare
e47d68e
to
ed46bc1
Compare
@sivel done. Could you merge? |
@sivel Could this be merged? |
@sieben apologies for not merging yet. The format of the changelog needed updated, which I did yesterday, but needed CI to run. I did not have time to come back and confirm yesterday. |
…ansible#48671) * Fix regression * Improve changelog fragment
…ansible#48671) * Fix regression * Improve changelog fragment
SUMMARY
It seems that the response object does not have a
getheader
but it got aheaders
attribute.ISSUE TYPE
COMPONENT NAME