]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools:Translate the StructurePCD value in field to correct format.
authorZhaozh1x <zhiqiangx.zhao@intel.com>
Thu, 18 Oct 2018 09:46:40 +0000 (17:46 +0800)
committerLiming Gao <liming.gao@intel.com>
Wed, 24 Oct 2018 14:27:05 +0000 (22:27 +0800)
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>
BaseTools/Source/Python/Workspace/DscBuildData.py

index 3b9c70eb15c8b3c23fa13525ebb559342a357c0d..f79eec1859639dd5f7b3e7dd1ba585b515dc92a4 100644 (file)
@@ -1903,15 +1903,12 @@ class DscBuildData(PlatformBuildClassObject):
                     IsArray = IsFieldValueAnArray(FieldList[FieldName][0])\r
                     if IsArray:\r
                         try:\r
-                            FieldValue = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)\r
+                            FieldList[FieldName][0] = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)\r
                         except BadExpression:\r
                             EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " %\r
                                             (".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))\r
                     try:\r
-                        if IsArray:\r
-                            Value, ValueSize = ParseFieldValue (FieldValue)\r
-                        else:\r
-                            Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])\r
+                        Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])\r
                     except Exception:\r
                         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]))\r
                     if isinstance(Value, str):\r