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 case where args or kwargs are not specified in loop state #49037

Merged
merged 3 commits into from
Aug 13, 2018

Conversation

mtlaird
Copy link
Contributor

@mtlaird mtlaird commented Aug 9, 2018

Currently, the m_ret line will error if the loop state definition does not specify values for args or kwargs, because None is neither iterable nor a map. If not specified, those values should be set to an empty list and empty dict.

What does this PR do?

Fixes an error with the loop state when the definition did not specify values for the m_args or m_kwargs parameters.

What issues does this PR fix or reference?

See above. I couldn't find an open issue for this, but it's an easy fix.

Previous Behavior

If those values were not specified, the state would fail and log a stack trace.

New Behavior

If those those values are not specified, the state will succeed without them.

Tests written?

No

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

Currently, the m_ret line will error if the loop state definition does not specify values for args or kwargs, because None is neither iterable nor a map. If not specified, those values should be set to an empty list and empty dict.
@rallytime
Copy link
Contributor

Welcome @mtlaird! Thank you for submitting this fix.

@rallytime rallytime merged commit 00763f1 into saltstack:develop Aug 13, 2018
@mtlaird mtlaird deleted the fix-loop-bug branch August 14, 2018 05:52
garethgreenaway added a commit to garethgreenaway/salt that referenced this pull request Sep 19, 2019
dwoz added a commit that referenced this pull request Dec 21, 2019
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.

3 participants