summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-08-10 14:47:35 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-08-16 09:30:04 +0800
commitb2282e5369c10a26e8cbf125cc22032ba903d619 (patch)
tree99cecd420468c93b463135ff7cefb8ce63f83d1d /BaseTools
parenta9ae5b37bf5c7a3accbd2a513c354c4467547a05 (diff)
downloadedk2-b2282e5369c10a26e8cbf125cc22032ba903d619.zip
edk2-b2282e5369c10a26e8cbf125cc22032ba903d619.tar.gz
edk2-b2282e5369c10a26e8cbf125cc22032ba903d619.tar.bz2
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>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/Common/Expression.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index ccc7368..0091e47 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -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