summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/Expression.py
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-03-28 07:42:47 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-03-29 16:31:24 +0800
commite52aed0d855218f23cbd94629561eb4155936cec (patch)
tree164fbc2ab4a67c8a3eb6eca76a87609d05583d00 /BaseTools/Source/Python/Common/Expression.py
parent38504ad3e3163fd8afbfc66760455df9dd223713 (diff)
downloadedk2-e52aed0d855218f23cbd94629561eb4155936cec.tar.gz
edk2-e52aed0d855218f23cbd94629561eb4155936cec.tar.bz2
edk2-e52aed0d855218f23cbd94629561eb4155936cec.zip
BaseTools: dont use enumerate when un-needed
Since we only use the item from the list and not the numeric value, dont bother with enumerate() 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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 4a7cd974b1..09240de697 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -899,7 +899,7 @@ class ValueExpressionEx(ValueExpression):
LabelDict = {}
NewPcdValueList = []
LabelOffset = 0
- for Index, Item in enumerate(PcdValueList):
+ for Item in PcdValueList:
# compute byte offset of every LABEL
LabelList = _ReLabel.findall(Item)
Item = _ReLabel.sub('', Item)
@@ -925,7 +925,7 @@ class ValueExpressionEx(ValueExpression):
except:
LabelOffset = LabelOffset + 1
- for Index, Item in enumerate(PcdValueList):
+ for Item in PcdValueList:
# for LABEL parse
Item = Item.strip()
try: