mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Patch for issue #25994
When the NamedTemporaryFile function is called it will through a TypeError exception. This converts the pid to a string before concatenating it to the ‘name’.
This commit is contained in:
parent
0f44761d6e
commit
b9e89d0f2d
@ -37,8 +37,8 @@ def __execute_cmd(name, xml):
|
||||
if not os.path.isdir(tmp_dir):
|
||||
os.mkdir(tmp_dir)
|
||||
with tempfile.NamedTemporaryFile(dir=tmp_dir,
|
||||
prefix=name,
|
||||
suffix=os.getpid(),
|
||||
prefix=name+str(os.getpid()),
|
||||
suffix='.xml',
|
||||
delete=False) as fh:
|
||||
tmpfilename = fh.name
|
||||
fh.write(xml)
|
||||
|
Loading…
Reference in New Issue
Block a user