Skip to content

Commit

Permalink
Merge pull request #6506 from terminalmage/issue6502
Browse files Browse the repository at this point in the history
Fix traceback in salt-call --local
  • Loading branch information
whiteinge committed Aug 2, 2013
2 parents 7670b18 + ab203f3 commit 1ab8c82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion salt/cli/caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def call(self):
ret = {}
fun = self.opts['fun']
ret['jid'] = '{0:%Y%m%d%H%M%S%f}'.format(datetime.datetime.now())
proc_fn = os.path.join(self.opts['cachedir'], 'proc', ret['jid'])
proc_fn = os.path.join(
salt.minion.get_proc_dir(self.opts['cachedir']),
ret['jid']
)
if fun not in self.minion.functions:
sys.stderr.write('Function {0} is not available\n'.format(fun))
sys.exit(-1)
Expand Down
4 changes: 0 additions & 4 deletions salt/minion.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ def get_proc_dir(cachedir):
if not os.path.isdir(fn_):
# proc_dir is not present, create it
os.makedirs(fn_)
else:
# proc_dir is present, clean out old proc files
for proc_fn in os.listdir(fn_):
os.remove(os.path.join(fn_, proc_fn))
return fn_


Expand Down

0 comments on commit 1ab8c82

Please sign in to comment.