]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/Python/sitecustomize.py
BaseTools: Do not call sys.setdefaultencoding with python 3
[mirror_edk2.git] / BaseTools / Source / Python / sitecustomize.py
CommitLineData
97fa0ee9 1## @file\r
f51461c8 2#\r
97fa0ee9
YL
3#\r
4# Copyright (c) 2009 - 2014, Apple Inc. All rights reserved.<BR>\r
f51461c8 5#\r
2e351cbe 6# SPDX-License-Identifier: BSD-2-Clause-Patent\r
f51461c8
LG
7import sys\r
8import locale\r
9\r
5c7006c9 10if sys.platform == "darwin" and sys.version_info[0] < 3:\r
f51461c8
LG
11 DefaultLocal = locale.getdefaultlocale()[1]\r
12 if DefaultLocal is None:\r
f7496d71 13 DefaultLocal = 'UTF8'\r
f51461c8
LG
14 sys.setdefaultencoding(DefaultLocal)\r
15\r