summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/GenVar.py
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/AutoGen/GenVar.py
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/AutoGen/GenVar.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/GenVar.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py b/BaseTools/Source/Python/AutoGen/GenVar.py
index 036f00e2bb..f7806b1dd3 100644
--- a/BaseTools/Source/Python/AutoGen/GenVar.py
+++ b/BaseTools/Source/Python/AutoGen/GenVar.py
@@ -93,7 +93,7 @@ class VariableMgr(object):
value_list,itemPcdname,itemPcdDscLine = newvalue[offset]
if offset > len(BaseValue) or (offset + len(value_list) > len(BaseValue)):
EdkLogger.error("build", AUTOGEN_ERROR, "The EFI Variable referred by PCD %s in line %s exceeds variable size: %s\n" % (itemPcdname,itemPcdDscLine,hex(len(BaseValue))))
- for i in xrange(len(value_list)):
+ for i in range(len(value_list)):
BaseValue[offset + i] = value_list[i]
newvaluestr = "{" + ",".join(BaseValue) +"}"
return newvaluestr
@@ -129,7 +129,7 @@ class VariableMgr(object):
for current_valuedict_key in ordered_valuedict_keys:
if current_valuedict_key < len(var_value):
raise
- for _ in xrange(current_valuedict_key - len(var_value)):
+ for _ in range(current_valuedict_key - len(var_value)):
var_value.append('0x00')
var_value += valuedict[current_valuedict_key]
return var_value