mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
parent
7d900d31ea
commit
7baf2809cf
@ -10,6 +10,7 @@ This is a thin wrapper around Pythons tempfile module
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -40,4 +41,6 @@ def file(suffix='', prefix='tmp', parent=None):
|
||||
salt '*' temp.file
|
||||
salt '*' temp.file prefix='mytemp-' parent='/var/run/'
|
||||
'''
|
||||
return tempfile.mkstemp(suffix, prefix, parent)[1]
|
||||
fh_, tmp_ = tempfile.mkstemp(suffix, prefix, parent)
|
||||
os.close(fh_)
|
||||
return tmp_
|
||||
|
Loading…
Reference in New Issue
Block a user