Skip to content

Commit

Permalink
encode stdin using cp1252 on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhelmus committed Dec 8, 2018
1 parent 245a2a9 commit 1346a29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions conda/gateways/disk/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,10 @@ def compile_multiple_pyc(python_exe_full_path, py_full_paths, pyc_full_paths):
if lexists(pyc_full_path):
maybe_raise(BasicClobberError(None, pyc_full_path, context), context)

if on_win:
py_full_paths = tuple((win_path_double_escape(p) for p in py_full_paths))
py_full_paths_str = os.linesep.join(py_full_paths)
if on_win:
# stdin needs to be encoded in the ANSI code page, i.e. cp1252
py_full_paths_str = py_full_paths_str.encode('cp1252', errors='ignore')
command = '"%s" -Wi -m py_compile -' % (python_exe_full_path, )
log.trace(command)
result = subprocess_call(command, stdin=py_full_paths_str, raise_on_error=False)
Expand Down

0 comments on commit 1346a29

Please sign in to comment.