BaseTools: Expression - remove variable
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>
Tue, 13 Mar 2018 23:11:34 +0000 (07:11 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Mon, 19 Mar 2018 01:26:21 +0000 (09:26 +0800)
The InArary variable serves no purpose.  just do the work immediately.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/Expression.py

index 85c1ce9..4f0f377 100644 (file)
@@ -123,7 +123,6 @@ def IsValidCName(Str):
     return True if __ValidString.match(Str) else False\r
 \r
 def BuildOptionValue(PcdValue, GuidDict):\r
-    IsArray = False\r
     if PcdValue.startswith('H'):\r
         InputValue = PcdValue[1:]\r
     elif PcdValue.startswith("L'") or PcdValue.startswith("'"):\r
@@ -133,8 +132,6 @@ def BuildOptionValue(PcdValue, GuidDict):
     else:\r
         InputValue = PcdValue\r
     if IsFieldValueAnArray(InputValue):\r
-        IsArray = True\r
-    if IsArray:\r
         try:\r
             PcdValue = ValueExpressionEx(InputValue, 'VOID*', GuidDict)(True)\r
         except:\r