From 8371d87412bc1dae454dcc570691fc0d63e710b4 Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Wed, 10 Oct 2018 11:00:31 +0800 Subject: BaseTools: Rename long() to int() Because the long() function 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/Common/Misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/Common/Misc.py') diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 502f607f8d..40c0105a3c 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -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"): -- cgit v1.2.3