]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenDepex.py
BaseTool: Fixed the incorrect cache key.
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenDepex.py
index b69788c37e08ab2b06e9f733c336361efbc073af..d3b1eae181c234912f641edf06979c841128bc2b 100644 (file)
@@ -17,7 +17,7 @@ import Common.LongFilePathOs as os
 import re\r
 import traceback\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
-from StringIO import StringIO\r
+from io import BytesIO\r
 from struct import pack\r
 from Common.BuildToolError import *\r
 from Common.Misc import SaveFileOnChange\r
@@ -140,7 +140,7 @@ class DependencyExpression:
     def __init__(self, Expression, ModuleType, Optimize=False):\r
         self.ModuleType = ModuleType\r
         self.Phase = gType2Phase[ModuleType]\r
-        if type(Expression) == type([]):\r
+        if isinstance(Expression, type([])):\r
             self.ExpressionString = " ".join(Expression)\r
             self.TokenList = Expression\r
         else:\r
@@ -345,7 +345,7 @@ class DependencyExpression:
     #   @retval False   If file exists and is not changed.\r
     #\r
     def Generate(self, File=None):\r
-        Buffer = StringIO()\r
+        Buffer = BytesIO()\r
         if len(self.PostfixNotation) == 0:\r
             return False\r
 \r