]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/Parser.py
BaseTools: Fix old python2 idioms
[mirror_edk2.git] / BaseTools / Source / Python / Eot / Parser.py
index 14c287588a017b37e16ca4ec9f09b756947ea943..0b720d5b2187c6962dc264a45fe8daec3f30c384 100644 (file)
@@ -19,9 +19,9 @@ import Common.LongFilePathOs as os, re
 import Common.EdkLogger as EdkLogger\r
 from Common.DataType import *\r
 from CommonDataClass.DataClass import *\r
-from Common.String import CleanString, GetSplitValueList, ReplaceMacro\r
+from Common.StringUtils import CleanString, GetSplitValueList, ReplaceMacro\r
 import EotGlobalData\r
-from Common.String import GetSplitList\r
+from Common.StringUtils import GetSplitList\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## PreProcess() method\r
@@ -730,7 +730,7 @@ def GetParameter(Parameter, Index = 1):
 #  @return: The name of parameter\r
 #\r
 def GetParameterName(Parameter):\r
-    if type(Parameter) == type('') and Parameter.startswith('&'):\r
+    if isinstance(Parameter, type('')) and Parameter.startswith('&'):\r
         return Parameter[1:].replace('{', '').replace('}', '').replace('\r', '').replace('\n', '').strip()\r
     else:\r
         return Parameter.strip()\r