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

loader: Add __opts__ to pack if not already present #63013

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

rhansen
Copy link
Contributor

@rhansen rhansen commented Nov 4, 2022

What does this PR do?

Adds the __opts__ dunder dictionary to the loader's pack if not already present, which makes it accessible via the salt.loader.context.NamedLoaderContext class.

What issues does this PR fix or reference?

See #62932 (comment) for context.

Previous Behavior

Accessing __opts__ via salt.loader.context.NamedLoaderContext raised a KeyError: '__opts__' exception.

New Behavior

Accessing __opts__ via salt.loader.context.NamedLoaderContext is now possible, and returns (a proxy for) the options dict that is passed to the LazyLoader constructor.

Merge requirements satisfied?

Commits signed with GPG?

no

@rhansen rhansen marked this pull request as ready for review November 4, 2022 06:59
@rhansen rhansen requested a review from a team as a code owner November 4, 2022 06:59
@rhansen rhansen requested review from waynew and removed request for a team November 4, 2022 06:59
@Ch3LL Ch3LL merged commit d7168f8 into saltstack:master Nov 7, 2022
@rhansen rhansen deleted the loader branch November 7, 2022 21:43
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