summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
authorBob Feng <bob.c.feng@intel.com>2019-07-16 17:14:08 +0800
committerLiming Gao <liming.gao@intel.com>2019-08-01 15:36:48 +0800
commit8ddec24dea74a7e172cb67d5bcaf6c74db3ac6f9 (patch)
tree9592b86222c312772fa01a2beba8e6ffd67d74b6 /BaseTools/Source/Python/Common
parent307e1650be267b67db7be1089e0979ace460d830 (diff)
downloadedk2-8ddec24dea74a7e172cb67d5bcaf6c74db3ac6f9.zip
edk2-8ddec24dea74a7e172cb67d5bcaf6c74db3ac6f9.tar.gz
edk2-8ddec24dea74a7e172cb67d5bcaf6c74db3ac6f9.tar.bz2
BaseTools:Updata the output encoding of the Popen function
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2015 Not all output works in utf-8, so change the encoding to the default This patch is going to fix that issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r--BaseTools/Source/Python/Common/Misc.py2
-rw-r--r--BaseTools/Source/Python/Common/VpdInfoFile.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 27dbdac..1caa184 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -1087,7 +1087,7 @@ def ParseFieldValue (Value):
p.stderr.close()
if err:
raise BadExpression("DevicePath: %s" % str(err))
- out = out.decode(encoding='utf-8', errors='ignore')
+ out = out.decode()
Size = len(out.split())
out = ','.join(out.split())
return '{' + out + '}', Size
diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py
index bc69a90..4249b9f 100644
--- a/BaseTools/Source/Python/Common/VpdInfoFile.py
+++ b/BaseTools/Source/Python/Common/VpdInfoFile.py
@@ -243,7 +243,7 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName):
except Exception as X:
EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, ExtraData=str(X))
(out, error) = PopenObject.communicate()
- print(out.decode(encoding='utf-8', errors='ignore'))
+ print(out.decode())
while PopenObject.returncode is None :
PopenObject.wait()