mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Pass on OSError if thin tarball already removed
This can happen in the test suite while running integration.ssh.test_state.SSHStateTest.test_state_running because the instance of salt-ssh running in the background has completed during the second salt-ssh run, and since the contents of the thin tarball haven't changed between runs, the checksum used to derive the path of the thin tarball hasn't changed, so it is unlinked before the 2nd salt-ssh run in that test completes.
This commit is contained in:
parent
4672baa6c8
commit
a61afda100
1 changed files with 4 additions and 1 deletions
|
@ -157,7 +157,10 @@ def unpack_thin(thin_path):
|
|||
tfile.extractall(path=OPTIONS.saltdir)
|
||||
tfile.close()
|
||||
os.umask(old_umask)
|
||||
os.unlink(thin_path)
|
||||
try:
|
||||
os.unlink(thin_path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
def need_ext():
|
||||
|
|
Loading…
Add table
Reference in a new issue