]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: replace get_bytes_le() to bytes_le
authorZhijux Fan <zhijux.fan@intel.com>
Wed, 28 Nov 2018 03:12:37 +0000 (11:12 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Fri, 1 Feb 2019 03:09:17 +0000 (11:09 +0800)
UUID does not have the get_bytes_le() in python3

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/Common/Misc.py
BaseTools/Source/Python/GenFds/CapsuleData.py
BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py

index 01bd62a9e2df45dd44ae70e208a6092adb95d0ab..2ef8e0783961ec27aad34d5c117b305a8b9426c6 100644 (file)
@@ -1180,7 +1180,7 @@ def ParseFieldValue (Value):
         if Value[0] == '"' and Value[-1] == '"':\r
             Value = Value[1:-1]\r
         try:\r
-            Value = "'" + uuid.UUID(Value).get_bytes_le() + "'"\r
+            Value = "'" + uuid.UUID(Value).bytes_le + "'"\r
         except ValueError as Message:\r
             raise BadExpression(Message)\r
         Value, Size = ParseFieldValue(Value)\r
index 6071e9f4a545c77753544a544ce5eb1bb1e2970a..db201c074b45b04a095b65150a6ec6d77466dfdb 100644 (file)
@@ -229,7 +229,7 @@ class CapsulePayload(CapsuleData):
                        )\r
         if AuthData:\r
             Buffer += pack('QIHH', AuthData[0], AuthData[1], AuthData[2], AuthData[3])\r
-            Buffer += uuid.UUID(AuthData[4]).get_bytes_le()\r
+            Buffer += uuid.UUID(AuthData[4]).bytes_le\r
 \r
         #\r
         # Append file content to the structure\r
index 3fd7eefd6af5555c7d8678fa095f9d52f6177655..370ae2e3fa561bf24e27efd7923c4513fe5d5e2f 100644 (file)
@@ -186,7 +186,7 @@ if __name__ == '__main__':
     # Write output file that contains hash GUID, Public Key, Signature, and Input data\r
     #\r
     args.OutputFile = open(args.OutputFileName, 'wb')\r
-    args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.get_bytes_le())\r
+    args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.bytes_le)\r
     args.OutputFile.write(PublicKey)\r
     args.OutputFile.write(Signature)\r
     args.OutputFile.write(args.InputFileBuffer)\r