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

Fix "dictionary changed size during iteration error" #2049

Merged
merged 1 commit into from Sep 20, 2021

Conversation

DrDaveD
Copy link
Contributor

@DrDaveD DrDaveD commented Sep 20, 2021

I got the following error with osg-notify:

$ osg-notify --type production --no-sign --message /etc/motd --subject 'OASIS upgrade' --recipients "dwd@fnal.gov" --oim-recipients resources --oim-contact-type administrative --dry-run
Traceback (most recent call last):
  File "/nashome/d/dwd/work/topology/bin/osg-notify", line 250, in <module>
    main()
  File "/nashome/d/dwd/work/topology/bin/osg-notify", line 192, in main
    results = topology_utils.filter_contacts(args, results)
  File "/nashome/d/dwd/work/topology/src/topology_utils.py", line 345, in filter_contacts
    for name in results.keys():
RuntimeError: dictionary changed size during iteration

This PR applies a hint from stack overflow.

Copy link
Member

@brianhlin brianhlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix

@brianhlin brianhlin merged commit 3009aee into opensciencegrid:master Sep 20, 2021
@DrDaveD DrDaveD deleted the fix-osg-notify-error branch September 20, 2021 15:03
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.

None yet

2 participants