From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8328E2194D387 for ; Mon, 28 Jan 2019 18:06:26 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jan 2019 18:06:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,535,1539673200"; d="scan'208";a="295229745" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga005.jf.intel.com with ESMTP; 28 Jan 2019 18:06:24 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Zhijux Fan , Bob Feng , Liming Gao , Yonghong Zhu Date: Tue, 29 Jan 2019 10:05:41 +0800 Message-Id: <20190129020610.14300-5-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 In-Reply-To: <20190129020610.14300-1-bob.c.feng@intel.com> References: <20190129020610.14300-1-bob.c.feng@intel.com> MIME-Version: 1.0 Subject: [Patch 04/33] BaseTools: replace get_bytes_le() to bytes_le X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2019 02:06:26 -0000 Content-Transfer-Encoding: 8bit From: Zhijux Fan UUID does not have the get_bytes_le() in python3 Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Common/Misc.py | 2 +- BaseTools/Source/Python/GenFds/CapsuleData.py | 2 +- BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 01bd62a9e2..2ef8e07839 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -1178,11 +1178,11 @@ def ParseFieldValue (Value): raise BadExpression("Invalid GUID value string %s" % Value) Value = TmpValue if Value[0] == '"' and Value[-1] == '"': Value = Value[1:-1] try: - Value = "'" + uuid.UUID(Value).get_bytes_le() + "'" + Value = "'" + uuid.UUID(Value).bytes_le + "'" except ValueError as Message: raise BadExpression(Message) Value, Size = ParseFieldValue(Value) return Value, 16 if Value.startswith('L"') and Value.endswith('"'): diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py index 6071e9f4a5..db201c074b 100644 --- a/BaseTools/Source/Python/GenFds/CapsuleData.py +++ b/BaseTools/Source/Python/GenFds/CapsuleData.py @@ -227,11 +227,11 @@ class CapsulePayload(CapsuleData): VendorFileSize, int(self.HardwareInstance, 16) ) if AuthData: Buffer += pack('QIHH', AuthData[0], AuthData[1], AuthData[2], AuthData[3]) - Buffer += uuid.UUID(AuthData[4]).get_bytes_le() + Buffer += uuid.UUID(AuthData[4]).bytes_le # # Append file content to the structure # ImageFile = open(self.ImageFile, 'rb') diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py index 3fd7eefd6a..370ae2e3fa 100644 --- a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py +++ b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py @@ -184,11 +184,11 @@ if __name__ == '__main__': # # Write output file that contains hash GUID, Public Key, Signature, and Input data # args.OutputFile = open(args.OutputFileName, 'wb') - args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.get_bytes_le()) + args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.bytes_le) args.OutputFile.write(PublicKey) args.OutputFile.write(Signature) args.OutputFile.write(args.InputFileBuffer) args.OutputFile.close() -- 2.20.1.windows.1