summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/Expression.py
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2018-04-20 23:51:26 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-26 14:36:05 +0800
commitb813843cca535392f6b1e090c1ff11f5ce76fd81 (patch)
tree10fc4e821377bc8aa66c0032117cbc9588728d5b /BaseTools/Source/Python/Common/Expression.py
parent6b1f2cf41a4a31d17eb1fc01e5db6f48b28c489e (diff)
downloadedk2-b813843cca535392f6b1e090c1ff11f5ce76fd81.tar.gz
edk2-b813843cca535392f6b1e090c1ff11f5ce76fd81.tar.bz2
edk2-b813843cca535392f6b1e090c1ff11f5ce76fd81.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/Common/Expression.py')
-rw-r--r--BaseTools/Source/Python/Common/Expression.py2
1 files changed, 1 insertions, 1 deletions
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