From 261eee25de664dcef2d99b6365b16c9bc444143f Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Thu, 26 Jul 2018 14:12:09 +0800 Subject: BaseTools: Rename xrange() to range() Because the xrange() was not exist in Python3 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao --- BaseTools/Source/Python/BPDG/GenVpd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'BaseTools/Source/Python/BPDG') 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() -- cgit v1.2.3