From nobody Fri May 3 21:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1489569887396704.4010153183607; Wed, 15 Mar 2017 02:24:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1AD53803F0; Wed, 15 Mar 2017 02:24:46 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 61F15803A4 for ; Wed, 15 Mar 2017 02:24:45 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 15 Mar 2017 02:24:44 -0700 Received: from unknown (HELO RTHOMAIY-DESK3.gar.corp.intel.com) ([10.223.165.169]) by orsmga001.jf.intel.com with ESMTP; 15 Mar 2017 02:24:43 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,168,1486454400"; d="scan'208";a="1108661016" From: rthomaiy To: edk2-devel@lists.01.org Date: Wed, 15 Mar 2017 14:54:23 +0530 Message-Id: <20170315092423.13840-1-richard.marian.thomaiyar@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 Subject: [edk2] [PATCH] IntelFsp2Pkg: Raise exception for invalid BSF option X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Raise exception for invalid BSF option in GenCfgOpt.py Cc: Maurice Ma Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Richard Thomaiyar Reviewed-by: jiewen.yao@Intel.com --- IntelFsp2Pkg/Tools/GenCfgOpt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt= .py index d8038e9..6dc1b10 100644 --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py @@ -1,6 +1,6 @@ ## @ GenCfgOpt.py # -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
# This program and the accompanying materials are licensed and made availa= ble under # the terms and conditions of the BSD License that accompanies this distri= bution. # The full text of the license may be found at @@ -1239,6 +1239,7 @@ EndList return 0 =20 def WriteBsfStruct (self, BsfFd, Item): + LogExpr =3D CLogicalExpression() if Item['type'] =3D=3D "None": Space =3D "gPlatformFspPkgTokenSpaceGuid" else: @@ -1260,6 +1261,9 @@ EndList for Option in OptList: Option =3D Option.strip() (OpVal, OpStr) =3D Option.split(':') + test =3D LogExpr.getNumber (OpVal) + if test is None: + raise Exception("Selection Index '%s' is not a num= ber" % OpVal) TmpList.append((OpVal, OpStr)) return TmpList =20 --=20 2.9.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel