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:
john zaitz 2015-08-06 12:07:11 +02:00
parent 0f44761d6e
commit b9e89d0f2d

View File

@ -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)