]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/CapsuleData.py
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / CapsuleData.py
index 9d17bf5afe28015be93375bc81c812a1da68709d..ebbde7f8708c556b3d350d7149da2f2226b605e0 100644 (file)
@@ -3,20 +3,14 @@
 #\r
 #  Copyright (c) 2007-2018, Intel Corporation. All rights reserved.<BR>\r
 #\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
 ##\r
 # Import Modules\r
 #\r
-import Ffs\r
-from GenFdsGlobalVariable import GenFdsGlobalVariable\r
+from __future__ import absolute_import\r
+from .GenFdsGlobalVariable import GenFdsGlobalVariable\r
 from io import BytesIO\r
 from struct import pack\r
 import os\r
@@ -82,7 +76,7 @@ class CapsuleFv (CapsuleData):
         if self.FvName.find('.fv') == -1:\r
             if self.FvName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FvDict:\r
                 FvObj = GenFdsGlobalVariable.FdfParser.Profile.FvDict[self.FvName.upper()]\r
-                FdBuffer = BytesIO('')\r
+                FdBuffer = BytesIO()\r
                 FvObj.CapsuleName = self.CapsuleName\r
                 FvFile = FvObj.AddToBuffer(FdBuffer)\r
                 FvObj.CapsuleName = None\r
@@ -229,7 +223,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