summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2018-12-09 21:44:32 +0800
committerBobCF <bob.c.feng@intel.com>2018-12-15 20:16:46 +0800
commit48e890457b06263c1faf04de67652816402f8e06 (patch)
treebb20b5d83d4fa582fe4b67abfe2e5d6342404aa7
parent9bf86b12ce04fcb7d997eb1fc8c55fd43d18ab79 (diff)
downloadedk2-48e890457b06263c1faf04de67652816402f8e06.zip
edk2-48e890457b06263c1faf04de67652816402f8e06.tar.gz
edk2-48e890457b06263c1faf04de67652816402f8e06.tar.bz2
BaseTools: Fixed the build fail issue for cases
https://bugzilla.tianocore.org/show_bug.cgi?id=1386 This patch is going to fix the regression issue that is introduced by commit 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5 The issue will happen in the following cases: 1. There is no Pcd value assignment in Dsc file 2. There are duplicate Pcd filed assignment Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r--BaseTools/Source/Python/Workspace/BuildClassObject.py2
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py
index 008eee1..d02232b 100644
--- a/BaseTools/Source/Python/Workspace/BuildClassObject.py
+++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py
@@ -291,7 +291,7 @@ class StructurePcd(PcdClassObject):
if DimensionAttr not in self.SkuOverrideValues[SkuName][DefaultStoreName]:
self.SkuOverrideValues[SkuName][DefaultStoreName][DimensionAttr] = collections.OrderedDict()
if FieldName in self.SkuOverrideValues[SkuName][DefaultStoreName][DimensionAttr]:
- del self.SkuOverrideValues[SkuName][DefaultStoreName][FieldName][DimensionAttr]
+ del self.SkuOverrideValues[SkuName][DefaultStoreName][DimensionAttr][FieldName]
self.SkuOverrideValues[SkuName][DefaultStoreName][DimensionAttr][FieldName] = [Value.strip(), FileName, LineNo]
return self.SkuOverrideValues[SkuName][DefaultStoreName][DimensionAttr][FieldName]
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 4bd5261..eaedba0 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1203,7 +1203,7 @@ class DscParser(MetaFileParser):
return
TokenList = GetSplitValueList(self._CurrentLine, TAB_VALUE_SPLIT, 1)
self._CurrentPcdName = TokenList[0]
- if TokenList[1].strip().startswith("{CODE"):
+ if len(TokenList) == 2 and TokenList[1].strip().startswith("{CODE"):
self._PcdDataTypeCODE = True
self._PcdCodeValue = TokenList[1].strip()