]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools: Replace StringIO.StringIO with io.BytesIO
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index bf1f853d56be0720c9bbdd0ed83da08abe1f59bc..08e81016de8b363fcddb67db8f011ce43a5e11de 100644 (file)
@@ -19,7 +19,7 @@
 from __future__ import print_function\r
 import Common.LongFilePathOs as os\r
 import re\r
-import StringIO\r
+from io import BytesIO\r
 import sys\r
 import glob\r
 import time\r
@@ -1782,7 +1782,7 @@ class Build():
                             if not Ma.IsLibrary:\r
                                 ModuleList[Ma.Guid.upper()] = Ma\r
 \r
-                    MapBuffer = StringIO('')\r
+                    MapBuffer = BytesIO('')\r
                     if self.LoadFixAddress != 0:\r
                         #\r
                         # Rebase module to the preferred memory address before GenFds\r
@@ -1940,7 +1940,7 @@ class Build():
                             if not Ma.IsLibrary:\r
                                 ModuleList[Ma.Guid.upper()] = Ma\r
 \r
-                    MapBuffer = StringIO('')\r
+                    MapBuffer = BytesIO('')\r
                     if self.LoadFixAddress != 0:\r
                         #\r
                         # Rebase module to the preferred memory address before GenFds\r
@@ -2127,7 +2127,7 @@ class Build():
                     #\r
                     # Rebase module to the preferred memory address before GenFds\r
                     #\r
-                    MapBuffer = StringIO('')\r
+                    MapBuffer = BytesIO('')\r
                     if self.LoadFixAddress != 0:\r
                         self._CollectModuleMapBuffer(MapBuffer, ModuleList)\r
 \r