mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix file.managed check_cmd file not found - Issue #42404
This commit is contained in:
parent
5c7def9a43
commit
190cdb8693
1 changed files with 7 additions and 3 deletions
|
@ -2430,12 +2430,16 @@ def managed(name,
|
|||
if sfn and os.path.isfile(sfn):
|
||||
os.remove(sfn)
|
||||
return ret
|
||||
|
||||
if sfn and os.path.isfile(sfn):
|
||||
os.remove(sfn)
|
||||
|
||||
# Since we generated a new tempfile and we are not returning here
|
||||
# lets change the original sfn to the new tempfile or else we will
|
||||
# get file not found
|
||||
if sfn and os.path.isfile(sfn):
|
||||
os.remove(sfn)
|
||||
sfn = tmp_filename
|
||||
|
||||
sfn = tmp_filename
|
||||
|
||||
else:
|
||||
ret = {'changes': {},
|
||||
'comment': '',
|
||||
|
|
Loading…
Add table
Reference in a new issue