Merge pull request #34198 from DarkKnightCZ/cmdmod-34196

Don't use binary mode for cmdmod.exec_code
This commit is contained in:
Mike Place 2016-06-22 10:14:06 -07:00 committed by GitHub
commit cb704b780b

View file

@ -2272,7 +2272,7 @@ def exec_code_all(lang, code, cwd=None):
salt '*' cmd.exec_code_all ruby 'puts "cheese"'
'''
codefile = salt.utils.mkstemp()
with salt.utils.fopen(codefile, 'w+t') as fp_:
with salt.utils.fopen(codefile, 'w+t', binary=False) as fp_:
fp_.write(code)
cmd = [lang, codefile]
ret = run_all(cmd, cwd=cwd, python_shell=False)