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/AutoGen/ValidCheckingInfoObject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py') diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py index edd40a1498..6ddf38fd0d 100644 --- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py +++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py @@ -57,7 +57,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): itemIndex += 1 realLength += 5 for v_data in item.data: - if type(v_data) in (int, long): + if isinstance(v_data, int): realLength += item.StorageWidth else: realLength += item.StorageWidth @@ -137,7 +137,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): Buffer += b realLength += 1 for v_data in item.data: - if type(v_data) in (int, long): + if isinstance(v_data, int): b = pack(PACK_CODE_BY_SIZE[item.StorageWidth], v_data) Buffer += b realLength += item.StorageWidth -- cgit v1.2.3