public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools:Function application error
@ 2019-02-14  9:11 Fan, ZhijuX
  2019-02-14 15:30 ` Carsey, Jaben
  0 siblings, 1 reply; 3+ messages in thread
From: Fan, ZhijuX @ 2019-02-14  9:11 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Gao, Liming, Feng, Bob C

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.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-15  0:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14  9:11 [PATCH] BaseTools:Function application error Fan, ZhijuX
2019-02-14 15:30 ` Carsey, Jaben
2019-02-15  0:59   ` FW: " Fan, ZhijuX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox