diff options
author | BobCF <bob.c.feng@intel.com> | 2018-09-25 13:20:46 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-09-26 22:50:36 +0800 |
commit | 57ee97c01ca0e81d146600a00885719b84bf1581 (patch) | |
tree | 678a1b4e02cfda40bcb6659236f784f9b7e98e76 /BaseTools/Source/Python/GenFds | |
parent | f27e800a99866543a4bfc36088bcbb7b81f33a99 (diff) | |
download | edk2-57ee97c01ca0e81d146600a00885719b84bf1581.tar.gz edk2-57ee97c01ca0e81d146600a00885719b84bf1581.tar.bz2 edk2-57ee97c01ca0e81d146600a00885719b84bf1581.zip |
BaseTool: Replace dict with OrderedDict.
Replace dict with OrderedDict for PCD so that
the pcd list has same order.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FdfParser.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 1f7d59bb51..63687e98bb 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -64,6 +64,7 @@ from Common.LongFilePathSupport import OpenLongFilePath as open from .Capsule import EFI_CERT_TYPE_PKCS7_GUID
from .Capsule import EFI_CERT_TYPE_RSA2048_SHA256_GUID
from Common.RangeExpression import RangeExpression
+from collections import OrderedDict
##define T_CHAR_SPACE ' '
##define T_CHAR_NULL '\0'
@@ -227,8 +228,8 @@ class FileProfile : EdkLogger.error("FdfParser", FILE_OPEN_FAILURE, ExtraData=FileName)
self.FileName = FileName
- self.PcdDict = {}
- self.PcdLocalDict = {}
+ self.PcdDict = OrderedDict()
+ self.PcdLocalDict = OrderedDict()
self.InfList = []
self.InfDict = {'ArchTBD':[]}
# ECC will use this Dict and List information
@@ -274,7 +275,7 @@ class FdfParser: # Key: [section name, UI name, arch]
# Value: {MACRO_NAME : MACRO_VALUE}
self.__MacroDict = tdict(True, 3)
- self.__PcdDict = {}
+ self.__PcdDict = OrderedDict()
self.__WipeOffArea = []
if GenFdsGlobalVariable.WorkSpaceDir == '':
|