]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/FvImageSection.py
BaseTools: Handle the bytes and str difference
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FvImageSection.py
index 3278a8befa5edbba8df26256836e5496061e5e4a..5f1b42b078acd337ea6434743b7a21555fda78b8 100644 (file)
@@ -98,7 +98,7 @@ class FvImageSection(FvImageSectionClassObject):
         # Generate Fv\r
         #\r
         if self.FvName is not None:\r
-            Buffer = BytesIO('')\r
+            Buffer = BytesIO()\r
             Fv = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName)\r
             if Fv is not None:\r
                 self.Fv = Fv\r
@@ -118,7 +118,7 @@ class FvImageSection(FvImageSectionClassObject):
                         # PI FvHeader is 0x48 byte\r
                         FvHeaderBuffer = FvFileObj.read(0x48)\r
                         # FV alignment position.\r
-                        FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F)\r
+                        FvAlignmentValue = 1 << (FvHeaderBuffer[0x2E] & 0x1F)\r
                         # FvAlignmentValue is larger than or equal to 1K\r
                         if FvAlignmentValue >= 0x400:\r
                             if FvAlignmentValue >= 0x100000:\r