summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/BPDG
diff options
context:
space:
mode:
authorYunhua Feng <yunhuax.feng@intel.com>2018-07-26 14:12:09 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-13 09:50:41 +0800
commit261eee25de664dcef2d99b6365b16c9bc444143f (patch)
tree209c06a120b7f773d742b180cf670bb4f5cd222e /BaseTools/Source/Python/BPDG
parent487062c048809420de1b008bc9d17815a8c4fbdb (diff)
downloadedk2-261eee25de664dcef2d99b6365b16c9bc444143f.tar.gz
edk2-261eee25de664dcef2d99b6365b16c9bc444143f.tar.bz2
edk2-261eee25de664dcef2d99b6365b16c9bc444143f.zip
BaseTools: Rename xrange() to range()
Because the xrange() was not exist in Python3 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/BPDG')
-rw-r--r--BaseTools/Source/Python/BPDG/GenVpd.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/BPDG/GenVpd.py b/BaseTools/Source/Python/BPDG/GenVpd.py
index 5dcd422f8b..366fac095b 100644
--- a/BaseTools/Source/Python/BPDG/GenVpd.py
+++ b/BaseTools/Source/Python/BPDG/GenVpd.py
@@ -211,7 +211,7 @@ class PcdEntry:
ReturnArray = array.array('B')
- for Index in xrange(len(ValueList)):
+ for Index in range(len(ValueList)):
Value = None
if ValueList[Index].lower().startswith('0x'):
# translate hex value
@@ -237,7 +237,7 @@ class PcdEntry:
ReturnArray.append(Value)
- for Index in xrange(len(ValueList), Size):
+ for Index in range(len(ValueList), Size):
ReturnArray.append(0)
self.PcdValue = ReturnArray.tolist()
@@ -272,7 +272,7 @@ class PcdEntry:
"Invalid unicode character %s in unicode string %s(File: %s Line: %s)" % \
(Value, UnicodeString, self.FileName, self.Lineno))
- for Index in xrange(len(UnicodeString) * 2, Size):
+ for Index in range(len(UnicodeString) * 2, Size):
ReturnArray.append(0)
self.PcdValue = ReturnArray.tolist()