Skip to content

Commit

Permalink
try to use sys.getfilesystemencoding instead of hardcoding cp1252
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan committed Dec 8, 2018
1 parent 1346a29 commit cf3dbd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conda/gateways/disk/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def compile_multiple_pyc(python_exe_full_path, py_full_paths, pyc_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')
py_full_paths_str = py_full_paths_str.encode(sys.getfilesystemencoding(), 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 cf3dbd8

Please sign in to comment.