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>
This commit is contained in:
Yunhua Feng
2018-07-26 14:12:09 +08:00
committed by Yonghong Zhu
parent 487062c048
commit 261eee25de
5 changed files with 18 additions and 18 deletions

View File

@ -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()