Skip to content
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

[PR #4933/9a928d5f backport][stable-4] Fix code in rax_clb_nodes that breaks in Python3 #4936

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jul 7, 2022

This is a backport of PR #4933 as merged into main (9a928d5).

SUMMARY

Fix syntax in rax_clb_nodes that breaks in Python3

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

community.general.rax_clb_nodes defined here: https://github.com/ansible-collections/community.general/blob/main/plugins/modules/cloud/rackspace/rax_clb_nodes.py

ADDITIONAL INFORMATION

Prior to this change, you are unable to run the rax_clb_nodes task against hosts that only have Python 3 installed. You would get this error:

RuntimeError: dictionary changed size during iteration

Now it works as expected under hosts with Python 2 or Python 3.

* Use syntax that works in both Python 2 and 3 when iterating through a
    dict that's going to be mutated during iteration
  * Fixes `dictionary changed size during iteration` error
  * Fixes #4932

(cherry picked from commit 9a928d5)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug cloud module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jul 7, 2022
@felixfontein felixfontein merged commit 07798c3 into stable-4 Jul 7, 2022
@felixfontein felixfontein deleted the patchback/backports/stable-4/9a928d5ffb9e08f0f9ba10376058563a7fff8f22/pr-4933 branch July 7, 2022 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug cloud module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants