summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/CapsuleData.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/GenFds/CapsuleData.py')
-rw-r--r--BaseTools/Source/Python/GenFds/CapsuleData.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py
index 5f93734935..0caba8983d 100644
--- a/BaseTools/Source/Python/GenFds/CapsuleData.py
+++ b/BaseTools/Source/Python/GenFds/CapsuleData.py
@@ -15,6 +15,7 @@
##
# Import Modules
#
+from __future__ import absolute_import
from . import Ffs
from .GenFdsGlobalVariable import GenFdsGlobalVariable
from io import BytesIO
@@ -82,7 +83,7 @@ class CapsuleFv (CapsuleData):
if self.FvName.find('.fv') == -1:
if self.FvName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FvDict:
FvObj = GenFdsGlobalVariable.FdfParser.Profile.FvDict[self.FvName.upper()]
- FdBuffer = BytesIO()
+ FdBuffer = BytesIO('')
FvObj.CapsuleName = self.CapsuleName
FvFile = FvObj.AddToBuffer(FdBuffer)
FvObj.CapsuleName = None
@@ -229,7 +230,7 @@ class CapsulePayload(CapsuleData):
)
if AuthData:
Buffer += pack('QIHH', AuthData[0], AuthData[1], AuthData[2], AuthData[3])
- Buffer += uuid.UUID(AuthData[4]).bytes_le
+ Buffer += uuid.UUID(AuthData[4]).get_bytes_le()
#
# Append file content to the structure