Used a safer method to get proc_fn

Previously, this called get_proc_dir(), which clears the contents of the
specified directory, resulting in issue #6238.
This commit is contained in:
Intchanter 2013-08-01 04:07:46 +00:00
parent 8e91f4aef9
commit 83c2e61525

View File

@ -52,9 +52,7 @@ class Caller(object):
ret = {}
fun = self.opts['fun']
ret['jid'] = '{0:%Y%m%d%H%M%S%f}'.format(datetime.datetime.now())
proc_fn = os.path.join(
salt.minion.get_proc_dir(self.opts['cachedir']),
ret['jid'])
proc_fn = os.path.join(self.opts['cachedir'], 'proc', ret['jid'])
if fun not in self.minion.functions:
sys.stderr.write('Function {0} is not available\n'.format(fun))
sys.exit(-1)