X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FTrim%2FTrim.py;h=76944c0e25b3284d69f1b30854162b4b785ffaf5;hb=86379ac48ba17c71d4623c57099b064b15118e21;hp=97f4e87587ee15f47a1930d563bc5a5b16daac77;hpb=0d1f5b2b5dc3c1cf381be0a1ec8f960dc6029a93;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py index 97f4e87587..76944c0e25 100644 --- a/BaseTools/Source/Python/Trim/Trim.py +++ b/BaseTools/Source/Python/Trim/Trim.py @@ -17,7 +17,7 @@ import Common.LongFilePathOs as os import sys import re -import StringIO +from io import BytesIO from optparse import OptionParser from optparse import make_option @@ -455,8 +455,8 @@ def GenerateVfrBinSec(ModuleName, DebugDir, OutputFile): except: EdkLogger.error("Trim", FILE_OPEN_FAILURE, "File open failed for %s" %OutputFile, None) - # Use a instance of StringIO to cache data - fStringIO = StringIO.StringIO('') + # Use a instance of BytesIO to cache data + fStringIO = BytesIO('') for Item in VfrUniOffsetList: if (Item[0].find("Strings") != -1):