BaseTools: simplify if call

the variable is a string type since we just used .strip() on it.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@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>
This commit is contained in:
Carsey, Jaben 2018-04-20 23:51:26 +08:00 committed by Yonghong Zhu
parent 6b1f2cf41a
commit b813843cca
1 changed files with 1 additions and 1 deletions

View File

@ -816,7 +816,7 @@ class ValueExpressionEx(ValueExpression):
except BadExpression, Value:
if self.PcdType in TAB_PCD_NUMERIC_TYPES:
PcdValue = PcdValue.strip()
if type(PcdValue) == type('') and PcdValue.startswith('{') and PcdValue.endswith('}'):
if PcdValue.startswith('{') and PcdValue.endswith('}'):
PcdValue = SplitPcdValueString(PcdValue[1:-1])
if type(PcdValue) == type([]):
TmpValue = 0