From b813843cca535392f6b1e090c1ff11f5ce76fd81 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Fri, 20 Apr 2018 23:51:26 +0800 Subject: BaseTools: simplify if call the variable is a string type since we just used .strip() on it. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Common/Expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Common/Expression.py') diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index 99b01012a0..53504c110d 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -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 -- cgit v1.2.3