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

[boto_lambda] handle ommitted Permissions parameter #33908

Merged
merged 2 commits into from
Jun 10, 2016

Conversation

ticosax
Copy link
Contributor

@ticosax ticosax commented Jun 9, 2016

What does this PR do?

If Permissions parameter was ommited but actual lambda function defines Permissions,
the state would fail attempting to compare old and new values.

An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1703, in call
    **cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1649, in wrapper
    return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/boto_lambda.py", line 255, in function_present
    region, key, keyid, profile)
File "/usr/lib/python2.7/dist-packages/salt/states/boto_lambda.py", line 372, in _function_permissions_present
    diffs = salt.utils.compare_dicts(curr_permissions, Permissions)
File "/usr/lib/python2.7/dist-packages/salt/utils/__init__.py", line 2355, in compare_dicts
    elif key not in new:
TypeError: argument of type 'NoneType' is not iterable

What issues does this PR fix or reference?

none

Tests written?

Yes

@rallytime
Copy link
Contributor

Thanks @ticosax! There is a little lint that needs to be cleaned up. Then we can get this in.

https://jenkins.saltstack.com/job/PR/job/salt-pr-lint-n/2500/violations/

@rallytime rallytime added the pending-changes The pull request needs additional changes before it can be merged label Jun 10, 2016
@ticosax ticosax force-pushed the bug-fix-lambda-Permissions branch from 0a44169 to 209736e Compare June 10, 2016 16:36
@ticosax
Copy link
Contributor Author

ticosax commented Jun 10, 2016

@rallytime Thanks. should be good now.

@rallytime rallytime removed the pending-changes The pull request needs additional changes before it can be merged label Jun 10, 2016
@rallytime rallytime merged commit f806c7e into saltstack:2016.3 Jun 10, 2016
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