# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
#\r
# This file is used to collect the Variable checking information\r
os.mkdir(dest)\r
BinFileName = "PcdVarCheck.bin"\r
BinFilePath = os.path.join(dest, BinFileName)\r
- Buffer = ''\r
+ Buffer = bytearray()\r
index = 0\r
for var_check_tab in self.var_check_info:\r
index += 1\r
itemIndex += 1\r
realLength += 5\r
for v_data in item.data:\r
- if type(v_data) in (int, long):\r
+ if isinstance(v_data, int):\r
realLength += item.StorageWidth\r
else:\r
realLength += item.StorageWidth\r
Buffer += b\r
realLength += 1\r
for v_data in item.data:\r
- if type(v_data) in (int, long):\r
+ if isinstance(v_data, int):\r
b = pack(PACK_CODE_BY_SIZE[item.StorageWidth], v_data)\r
Buffer += b\r
realLength += item.StorageWidth\r