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

Don't pop from currently iterated dict #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nphilipp
Copy link

@nphilipp nphilipp commented Jun 9, 2020

Avoids: "RuntimeError: dictionary changed size during iteration"

Context: https://fedora.softwarefactory-project.io/zuul/build/c5d36ac22ef741b4b2e5abb2f7a8cd29

Traceback (most recent call last):
  File "/usr/bin/ansible-review", line 11, in <module>
    load_entry_point('ansible-review==0.13.9', 'console_scripts', 'ansible-review')()
  File "/usr/lib/python3.7/site-packages/ansiblereview/__main__.py", line 99, in main
    errors = errors + candidate.review(options, lines)
  File "/usr/lib/python3.7/site-packages/ansiblereview/__init__.py", line 76, in review
    return utils.review(self, settings, lines)
  File "/usr/lib/python3.7/site-packages/ansiblereview/utils/__init__.py", line 120, in review
    result = standard.check(candidate, settings)
  File "/usr/lib/python3.7/site-packages/ansiblereview/groupvars.py", line 89, in same_variable_defined_in_competing_groups
    remove_inherited_and_overridden_group_vars(group, inv)
  File "/usr/lib/python3.7/site-packages/ansiblereview/groupvars.py", line 53, in remove_inherited_and_overridden_group_vars
    remove_inherited_and_overridden_vars(_vars[group], ancestor, inventory)
  File "/usr/lib/python3.7/site-packages/ansiblereview/groupvars.py", line 41, in remove_inherited_and_overridden_vars
    for (k, v) in vars.items():
RuntimeError: dictionary changed size during iteration

Avoids: "RuntimeError: dictionary changed size during iteration"

Signed-off-by: Nils Philippsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant