BaseTools: Remove the redundant if statement

after analysis the BuildOptionValue function, we found the if statement
IsFieldValueAnArray is redundant because ValueExpressionEx will handle
it.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2018-08-10 14:47:35 +08:00
parent a9ae5b37bf
commit b2282e5369
1 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ from __future__ import absolute_import
from Common.GlobalData import *
from CommonDataClass.Exceptions import BadExpression
from CommonDataClass.Exceptions import WrnExpression
from .Misc import GuidStringToGuidStructureString, ParseFieldValue, IsFieldValueAnArray
from .Misc import GuidStringToGuidStructureString, ParseFieldValue
import Common.EdkLogger as EdkLogger
import copy
from Common.DataType import *
@ -138,11 +138,11 @@ def BuildOptionValue(PcdValue, GuidDict):
InputValue = 'L"' + PcdValue[1:] + '"'
else:
InputValue = PcdValue
if IsFieldValueAnArray(InputValue):
try:
PcdValue = ValueExpressionEx(InputValue, TAB_VOID, GuidDict)(True)
except:
pass
try:
PcdValue = ValueExpressionEx(InputValue, TAB_VOID, GuidDict)(True)
except:
pass
return PcdValue
## ReplaceExprMacro