From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=zhiqiangx.zhao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 18CDC21B02822 for ; Mon, 22 Oct 2018 00:06:05 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2018 00:06:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,411,1534834800"; d="scan'208";a="83367044" Received: from tiano-zzq.ccr.corp.intel.com ([10.239.49.19]) by orsmga008.jf.intel.com with ESMTP; 22 Oct 2018 00:06:03 -0700 From: Zhaozh1x To: edk2-devel@lists.01.org Cc: Zhaozh1x , Liming Gao , Yonghong Zhu , Bob Feng Date: Mon, 22 Oct 2018 15:05:59 +0800 Message-Id: <20181022070559.76680-1-zhiqiangx.zhao@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [PATCH] BaseTools:Translate the StructurePCD value in field to correct format. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 07:06:06 -0000 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 Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng --- BaseTools/Source/Python/Workspace/DscBuildData.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 17e6f62cac..9b1be3ec59 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1925,15 +1925,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): -- 2.14.1.windows.1