BaseTools: Rename long() to int()
Because the long() function 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:
committed by
Yonghong Zhu
parent
261eee25de
commit
8371d87412
@ -1591,7 +1591,7 @@ def CheckPcdDatum(Type, Value):
|
||||
if Value and int(Value, 0) < 0:
|
||||
return False, "PCD can't be set to negative value[%s] for datum type [%s]" % (Value, Type)
|
||||
try:
|
||||
Value = long(Value, 0)
|
||||
Value = int(Value, 0)
|
||||
if Value > MAX_VAL_TYPE[Type]:
|
||||
return False, "Too large PCD value[%s] for datum type [%s]" % (Value, Type)
|
||||
except:
|
||||
@ -2081,7 +2081,7 @@ def PackRegistryFormatGuid(Guid):
|
||||
# @retval Value The integer value that the input represents
|
||||
#
|
||||
def GetIntegerValue(Input):
|
||||
if type(Input) in (int, long):
|
||||
if isinstance(Input, int):
|
||||
return Input
|
||||
String = Input
|
||||
if String.endswith("U"):
|
||||
|
Reference in New Issue
Block a user