X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FAutoGen%2FValidCheckingInfoObject.py;h=92ede7a82324f59a82028368da2075487005e7b2;hb=8e011d83bbd7006919c00917fbdfaf7a60edae21;hp=4a6e031053c64fecc96d34358126b5bf222d1bb2;hpb=82a6a9605c35f814bd6187979980258ed1b75abd;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py index 4a6e031053..92ede7a823 100644 --- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py +++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py @@ -31,7 +31,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): break else: self.var_check_info.append(var_check_tab) - + def dump(self, dest, Phase): FormatMap = {} @@ -62,7 +62,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): itemIndex += 1 realLength += 5 for v_data in item.data: - if type(v_data) == type(1): + if type(v_data) in (int, long): realLength += item.StorageWidth else: realLength += item.StorageWidth @@ -153,9 +153,8 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): b = pack("=B", item.StorageWidth) Buffer += b realLength += 1 - for v_data in item.data: - if type(v_data) == type(1): + if type(v_data) in (int, long): b = pack(FormatMap[item.StorageWidth], v_data) Buffer += b realLength += item.StorageWidth