diff options
author | Zhaozh1x <zhiqiangx.zhao@intel.com> | 2018-10-18 17:46:40 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-10-24 22:27:05 +0800 |
commit | 2855e9c330cde2817d9cc9517381d5e60bcf74f5 (patch) | |
tree | 6dd77eb46f93513fb4bdffc65d65c2b2bb5ab2c1 /BaseTools/Source/Python/Workspace/DscBuildData.py | |
parent | da2d4f76b79d450c08a2ba7fec3be24ef5719eee (diff) | |
download | edk2-2855e9c330cde2817d9cc9517381d5e60bcf74f5.tar.gz edk2-2855e9c330cde2817d9cc9517381d5e60bcf74f5.tar.bz2 edk2-2855e9c330cde2817d9cc9517381d5e60bcf74f5.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DscBuildData.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 3b9c70eb15..f79eec1859 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1903,15 +1903,12 @@ class DscBuildData(PlatformBuildClassObject): IsArray = IsFieldValueAnArray(FieldList[FieldName][0])
if IsArray:
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:
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]))
try:
- if IsArray:
- Value, ValueSize = ParseFieldValue (FieldValue)
- else:
- Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
+ Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
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]))
if isinstance(Value, str):
|