BaseTools: Do not call sys.setdefaultencoding with python 3

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2301

This interface was a originally a no-op in python 3, and now
is fully removed causing a build warning on macOS (Darwin).

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>>
Acked-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Vitaly Cheptsov via Groups.Io 2019-10-20 18:26:18 +08:00 committed by Feng, Bob C
parent 53b1dd1036
commit 5c7006c9de
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@
import sys
import locale
if sys.platform == "darwin":
if sys.platform == "darwin" and sys.version_info[0] < 3:
DefaultLocal = locale.getdefaultlocale()[1]
if DefaultLocal is None:
DefaultLocal = 'UTF8'