diff options
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 1e5f86937d..ac2c2cda50 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -518,7 +518,7 @@ class WorkspaceAutoGen(AutoGen): for BuildData in PGen.BuildDatabase._CACHE_.values():
if BuildData.Arch != Arch:
continue
- for key in BuildData.Pcds:
+ for key in list(BuildData.Pcds.keys()):
for SinglePcd in GlobalData.MixedPcd:
if (BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName) == SinglePcd:
for item in GlobalData.MixedPcd[SinglePcd]:
@@ -864,7 +864,7 @@ class WorkspaceAutoGen(AutoGen): def _CheckAllPcdsTokenValueConflict(self):
for Pa in self.AutoGenObjectList:
for Package in Pa.PackageList:
- PcdList = Package.Pcds.values()
+ PcdList = list(Package.Pcds.values())
PcdList.sort(key=lambda x: int(x.TokenValue, 0))
Count = 0
while (Count < len(PcdList) - 1) :
@@ -910,7 +910,7 @@ class WorkspaceAutoGen(AutoGen): Count += SameTokenValuePcdListCount
Count += 1
- PcdList = Package.Pcds.values()
+ PcdList = list(Package.Pcds.values())
PcdList.sort(key=lambda x: "%s.%s" % (x.TokenSpaceGuidCName, x.TokenCName))
Count = 0
while (Count < len(PcdList) - 1) :
@@ -1179,7 +1179,7 @@ class PlatformAutoGen(AutoGen): if os.path.exists(VpdMapFilePath):
OrgVpdFile.Read(VpdMapFilePath)
PcdItems = OrgVpdFile.GetOffset(PcdNvStoreDfBuffer[0])
- NvStoreOffset = PcdItems.values()[0].strip() if PcdItems else '0'
+ NvStoreOffset = list(PcdItems.values())[0].strip() if PcdItems else '0'
else:
EdkLogger.error("build", FILE_READ_FAILURE, "Can not find VPD map file %s to fix up VPD offset." % VpdMapFilePath)
@@ -1229,7 +1229,7 @@ class PlatformAutoGen(AutoGen): FdfModuleList.append(os.path.normpath(InfName))
for M in self._MaList:
# F is the Module for which M is the module autogen
- for PcdFromModule in M.ModulePcdList + M.LibraryPcdList:
+ for PcdFromModule in list(M.ModulePcdList) + list(M.LibraryPcdList):
# make sure that the "VOID*" kind of datum has MaxDatumSize set
if PcdFromModule.DatumType == TAB_VOID and not PcdFromModule.MaxDatumSize:
NoDatumTypePcdList.add("%s.%s [%s]" % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, M.MetaFile))
@@ -1378,7 +1378,7 @@ class PlatformAutoGen(AutoGen): if (self.Workspace.ArchList[-1] == self.Arch):
for Pcd in self._DynamicPcdList:
# just pick the a value to determine whether is unicode string type
- Sku = Pcd.SkuInfoList.values()[0]
+ Sku = list(Pcd.SkuInfoList.values())[0]
Sku.VpdOffset = Sku.VpdOffset.strip()
if Pcd.DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, TAB_VOID, "BOOLEAN"]:
@@ -1477,7 +1477,7 @@ class PlatformAutoGen(AutoGen): if not FoundFlag :
# just pick the a value to determine whether is unicode string type
SkuValueMap = {}
- SkuObjList = DscPcdEntry.SkuInfoList.items()
+ SkuObjList = list(DscPcdEntry.SkuInfoList.items())
DefaultSku = DscPcdEntry.SkuInfoList.get(TAB_DEFAULT)
if DefaultSku:
defaultindex = SkuObjList.index((TAB_DEFAULT, DefaultSku))
@@ -1503,7 +1503,7 @@ class PlatformAutoGen(AutoGen): DscPcdEntry.TokenSpaceGuidValue = eachDec.Guids[DecPcdEntry.TokenSpaceGuidCName]
# Only fix the value while no value provided in DSC file.
if not Sku.DefaultValue:
- DscPcdEntry.SkuInfoList[DscPcdEntry.SkuInfoList.keys()[0]].DefaultValue = DecPcdEntry.DefaultValue
+ DscPcdEntry.SkuInfoList[list(DscPcdEntry.SkuInfoList.keys())[0]].DefaultValue = DecPcdEntry.DefaultValue
if DscPcdEntry not in self._DynamicPcdList:
self._DynamicPcdList.append(DscPcdEntry)
@@ -1579,7 +1579,7 @@ class PlatformAutoGen(AutoGen): # Delete the DynamicPcdList At the last time enter into this function
for Pcd in self._DynamicPcdList:
# just pick the a value to determine whether is unicode string type
- Sku = Pcd.SkuInfoList.values()[0]
+ Sku = list(Pcd.SkuInfoList.values())[0]
Sku.VpdOffset = Sku.VpdOffset.strip()
if Pcd.DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, TAB_VOID, "BOOLEAN"]:
@@ -2144,7 +2144,7 @@ class PlatformAutoGen(AutoGen): Pcd.MaxDatumSize = str(len(Value.split(',')))
else:
Pcd.MaxDatumSize = str(len(Value) - 1)
- return Pcds.values()
+ return list(Pcds.values())
## Resolve library names to library modules
#
@@ -2248,7 +2248,7 @@ class PlatformAutoGen(AutoGen): # Use the highest priority value.
#
if (len(OverrideList) >= 2):
- KeyList = OverrideList.keys()
+ KeyList = list(OverrideList.keys())
for Index in range(len(KeyList)):
NowKey = KeyList[Index]
Target1, ToolChain1, Arch1, CommandType1, Attr1 = NowKey.split("_")
@@ -2370,9 +2370,9 @@ class PlatformAutoGen(AutoGen): if Attr == TAB_TOD_DEFINES_BUILDRULEORDER:
BuildRuleOrder = Options[Tool][Attr]
- AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() +
- PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
- self.ToolDefinition.keys())
+ AllTools = set(list(ModuleOptions.keys()) + list(PlatformOptions.keys()) +
+ list(PlatformModuleOptions.keys()) + list(ModuleTypeOptions.keys()) +
+ list(self.ToolDefinition.keys()))
BuildOptions = defaultdict(lambda: defaultdict(str))
for Tool in AllTools:
for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, ModuleTypeOptions, PlatformModuleOptions]:
@@ -3436,7 +3436,7 @@ class ModuleAutoGen(AutoGen): return None
MapFileName = os.path.join(self.OutputDir, self.Name + ".map")
EfiFileName = os.path.join(self.OutputDir, self.Name + ".efi")
- VfrUniOffsetList = GetVariableOffset(MapFileName, EfiFileName, VfrUniBaseName.values())
+ VfrUniOffsetList = GetVariableOffset(MapFileName, EfiFileName, list(VfrUniBaseName.values()))
if not VfrUniOffsetList:
return None
@@ -3521,7 +3521,7 @@ class ModuleAutoGen(AutoGen): Packages = []
PcdCheckList = []
PcdTokenSpaceList = []
- for Pcd in self.ModulePcdList + self.LibraryPcdList:
+ for Pcd in list(self.ModulePcdList) + list(self.LibraryPcdList):
if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
PatchablePcds.append(Pcd)
PcdCheckList.append((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, TAB_PCDS_PATCHABLE_IN_MODULE))
|