import Common.LongFilePathOs as os\r
import sys\r
import re\r
-import StringIO\r
+from io import BytesIO\r
\r
from optparse import OptionParser\r
from optparse import make_option\r
if len(MatchList) == 2:\r
LineNumber = int(MatchList[0], 0)\r
InjectedFile = MatchList[1]\r
+ InjectedFile = os.path.normpath(InjectedFile)\r
+ InjectedFile = os.path.normcase(InjectedFile)\r
# The first injetcted file must be the preprocessed file itself\r
if PreprocessedFile == "":\r
PreprocessedFile = InjectedFile\r
except:\r
EdkLogger.error("Trim", FILE_OPEN_FAILURE, "File open failed for %s" %OutputFile, None)\r
\r
- # Use a instance of StringIO to cache data\r
- fStringIO = StringIO.StringIO('')\r
+ # Use a instance of BytesIO to cache data\r
+ fStringIO = BytesIO('')\r
\r
for Item in VfrUniOffsetList:\r
if (Item[0].find("Strings") != -1):\r