X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFsp2Pkg%2FTools%2FGenCfgOpt.py;h=6dc1b10b34697c7b7fb490135c6cf9c767b0c628;hp=d8038e98ce9e0f354f9aec114ccbdecb7ecf392b;hb=ba8ea42738cf5caa8855c59da5359b8e7929568f;hpb=e4408576df907721e87a2b439087a54790dcad46 diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py index d8038e98ce..6dc1b10b34 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 available under # the terms and conditions of the BSD License that accompanies this distribution. # The full text of the license may be found at @@ -1239,6 +1239,7 @@ EndList return 0 def WriteBsfStruct (self, BsfFd, Item): + LogExpr = CLogicalExpression() if Item['type'] == "None": Space = "gPlatformFspPkgTokenSpaceGuid" else: @@ -1260,6 +1261,9 @@ EndList for Option in OptList: Option = Option.strip() (OpVal, OpStr) = Option.split(':') + test = LogExpr.getNumber (OpVal) + if test is None: + raise Exception("Selection Index '%s' is not a number" % OpVal) TmpList.append((OpVal, OpStr)) return TmpList