mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix chroot tests
This commit is contained in:
parent
62966ec126
commit
c05d4cc882
2 changed files with 6 additions and 4 deletions
1
changelog/63920.fixed.md
Normal file
1
changelog/63920.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Fix valuerror when trying to close fileclient. Remove usage of __del__ and close the filclient properly.
|
|
@ -316,13 +316,14 @@ def sls(root, mods, saltenv="base", test=None, exclude=None, **kwargs):
|
|||
# needed, as this module just delegate
|
||||
opts = salt.utils.state.get_sls_opts(__opts__, **kwargs)
|
||||
|
||||
st_ = salt.client.ssh.state.SSHHighState(
|
||||
opts, pillar, __salt__, salt.fileclient.get_file_client(__opts__)
|
||||
)
|
||||
|
||||
if isinstance(mods, str):
|
||||
mods = mods.split(",")
|
||||
|
||||
with salt.client.ssh.state.SSHHighState(
|
||||
opts, pillar, __salt__, salt.fileclient.get_file_client(__opts__)
|
||||
) as st_:
|
||||
|
||||
with st_:
|
||||
high_data, errors = st_.render_highstate({saltenv: mods})
|
||||
if exclude:
|
||||
if isinstance(exclude, str):
|
||||
|
|
Loading…
Add table
Reference in a new issue