diff options
author | Zhijux Fan <zhijux.fan@intel.com> | 2018-11-28 09:26:06 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-02-01 11:09:16 +0800 |
commit | e77e59c9bdb929c4d6e896d181ad2752fac7b538 (patch) | |
tree | ef3d8a01c2c97f58e29bca2d684d3689894a9a8b /BaseTools/Source/Python/BPDG/GenVpd.py | |
parent | cc01b26e053c7ae1e33889c8bc42beaa1d7799ac (diff) | |
download | edk2-e77e59c9bdb929c4d6e896d181ad2752fac7b538.tar.gz edk2-e77e59c9bdb929c4d6e896d181ad2752fac7b538.tar.bz2 edk2-e77e59c9bdb929c4d6e896d181ad2752fac7b538.zip |
BaseTool:Rename xrange() to range()
Because the xrange() was not exist in Python3
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/BPDG/GenVpd.py')
-rw-r--r-- | BaseTools/Source/Python/BPDG/GenVpd.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/BPDG/GenVpd.py b/BaseTools/Source/Python/BPDG/GenVpd.py index e5da47f95e..b91837d3d6 100644 --- a/BaseTools/Source/Python/BPDG/GenVpd.py +++ b/BaseTools/Source/Python/BPDG/GenVpd.py @@ -212,7 +212,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
@@ -238,7 +238,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()
@@ -273,7 +273,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()
|