make exec_code run without a shell

This commit is contained in:
Thomas S Hatch 2014-09-11 09:15:49 -06:00
parent c5a8d14ada
commit c558748b5f

View File

@ -1225,9 +1225,8 @@ def exec_code(lang, code, cwd=None):
codefile = salt.utils.mkstemp()
with salt.utils.fopen(codefile, 'w+t') as fp_:
fp_.write(code)
cmd = '{0} {1}'.format(lang, codefile)
ret = run(cmd, cwd=cwd)
cmd = [lang, codefile]
ret = run(cmd, cwd=cwd, python_shell=False)
os.remove(codefile)
return ret