Error due to incorrect function parameters and attributes
FileWrite() The first argument it needs is a list, not a file
This patch abandons this function and saves the file independently

Cc: Bob Feng <bob.c.f...@intel.com>
Cc: Liming Gao <liming....@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux....@intel.com>
---
 BaseTools/Source/Python/Eot/EotMain.py                | 5 +++--
 BaseTools/Source/Python/Workspace/BuildClassObject.py | 1 +
 BaseTools/Source/Python/build/BuildReport.py          | 9 ++++++---
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/BaseTools/Source/Python/Eot/EotMain.py 
b/BaseTools/Source/Python/Eot/EotMain.py
index fd4bee6f90..8c2bfc45e4 100644
--- a/BaseTools/Source/Python/Eot/EotMain.py
+++ b/BaseTools/Source/Python/Eot/EotMain.py
@@ -21,7 +21,7 @@ import Eot.EotGlobalData as EotGlobalData
 from optparse import OptionParser
 from Common.StringUtils import NormPath
 from Common import BuildToolError
-from Common.Misc import GuidStructureStringToGuidString, sdict
+from Common.Misc import GuidStructureStringToGuidString
 from Eot.Parser import *
 from Eot.InfParserLite import EdkInfParser
 from Common.StringUtils import GetSplitValueList
@@ -32,6 +32,7 @@ from Eot.Report import Report
 from Common.BuildVersion import gBUILD_VERSION
 from Eot.Parser import ConvertGuid
 from Common.LongFilePathSupport import OpenLongFilePath as open
+import collections
 import struct
 import uuid
 import copy
@@ -57,7 +58,7 @@ class Image(array):
         self._LEN_ = None
         self._OFF_ = None
 
-        self._SubImages = sdict() # {offset: Image()}
+        self._SubImages = collections.OrderedDict() # {offset: Image()}
 
         array.__init__(self)
 
diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py 
b/BaseTools/Source/Python/Workspace/BuildClassObject.py
index cff77a71ae..6f8a09e87c 100644
--- a/BaseTools/Source/Python/Workspace/BuildClassObject.py
+++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py
@@ -261,6 +261,7 @@ class StructurePcd(PcdClassObject):
         self.PackageDecs = Packages
         self.DefaultStoreName = [default_store]
         self.DefaultValues = OrderedDict()
+        self.DefaultFromDSC = None
         self.PcdMode = None
         self.SkuOverrideValues = OrderedDict()
         self.StructName = None
diff --git a/BaseTools/Source/Python/build/BuildReport.py 
b/BaseTools/Source/Python/build/BuildReport.py
index 0b98d62cb6..70584570a5 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1651,14 +1651,17 @@ class PredictionReport(object):
         SourceList = os.path.join(self._EotDir, "SourceFile.txt")
         GuidList = os.path.join(self._EotDir, "GuidList.txt")
         DispatchList = os.path.join(self._EotDir, "Dispatch.txt")
-
+        TempList = []
         TempFile = open(SourceList, "w+")
         for Item in self._SourceList:
-            FileWrite(TempFile, Item)
+            TempList.append(Item + TAB_LINE_BREAK)
+        TempFile.writelines(TempList)
         TempFile.close()
+        TempList = []
         TempFile = open(GuidList, "w+")
         for Key in self._GuidMap:
-            FileWrite(TempFile, "%s %s" % (Key, self._GuidMap[Key]))
+            TempList.append("%s %s %s" % (Key, self._GuidMap[Key], 
TAB_LINE_BREAK))
+        TempFile.writelines(TempList)
         TempFile.close()
 
         try:
-- 
2.14.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to