Skip to content

Commit

Permalink
Add more loader dunders to cp module.
Browse files Browse the repository at this point in the history
Using cp module to dip our feet into more explicit loader dunders. Most
all of the existing dunders can be imported already. The one outlier
being used by the cp module is __opts__.
  • Loading branch information
dwoz committed Apr 11, 2024
1 parent 559825c commit 159d932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions salt/loader/dunder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@


__file_client__ = loader_context.named_context("__file_client__", default=None)
__context__ = loader_context.named_context("__context__")
__pillar__ = loader_context.named_context("__pillar__")
__grains__ = loader_context.named_context("__grains__")
2 changes: 1 addition & 1 deletion salt/modules/cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import salt.utils.templates
import salt.utils.url
from salt.exceptions import CommandExecutionError
from salt.loader.dunder import __file_client__
from salt.loader.dunder import __context__, __file_client__, __grains__, __pillar__

log = logging.getLogger(__name__)

Expand Down

0 comments on commit 159d932

Please sign in to comment.