deploy.py: Fix when running with Python 3.6

Which happens to be the default version on macOS 10.14.
Python 3.6 does not return a sensible default encoding if you don't
fiddle with your environment (like explicitly setting LANG). Fall back
to UTF-8.

Change-Id: I12534e4745e9c29b40a02c4946d8079d395cc650
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2020-11-24 17:05:08 +01:00
parent a118dc4836
commit b47d95449d

View File

@@ -30,6 +30,8 @@ import subprocess
import sys import sys
encoding = locale.getdefaultlocale()[1] encoding = locale.getdefaultlocale()[1]
if not encoding:
encoding = 'UTF-8'
def is_windows_platform(): def is_windows_platform():
return sys.platform.startswith('win') return sys.platform.startswith('win')