mirror of https://github.com/acidanthera/audk.git
BaseTools:Translate the StructurePCD value in field to correct format.
For StructurePCD value got from DSC file, translate its field value in to correct format in report. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
parent
da2d4f76b7
commit
2855e9c330
|
@ -1903,15 +1903,12 @@ class DscBuildData(PlatformBuildClassObject):
|
||||||
IsArray = IsFieldValueAnArray(FieldList[FieldName][0])
|
IsArray = IsFieldValueAnArray(FieldList[FieldName][0])
|
||||||
if IsArray:
|
if IsArray:
|
||||||
try:
|
try:
|
||||||
FieldValue = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)
|
FieldList[FieldName][0] = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)
|
||||||
except BadExpression:
|
except BadExpression:
|
||||||
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " %
|
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " %
|
||||||
(".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
|
(".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
|
||||||
try:
|
try:
|
||||||
if IsArray:
|
Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
|
||||||
Value, ValueSize = ParseFieldValue (FieldValue)
|
|
||||||
else:
|
|
||||||
Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
|
|
||||||
except Exception:
|
except Exception:
|
||||||
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
|
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
|
||||||
if isinstance(Value, str):
|
if isinstance(Value, str):
|
||||||
|
|
Loading…
Reference in New Issue