]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools: Fix old python2 idioms
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index 49869d9ee4e63b333f93dfd4e9a775033850274d..bf1f853d56be0720c9bbdd0ed83da08abe1f59bc 100644 (file)
@@ -305,7 +305,7 @@ def LaunchCommand(Command, WorkingDir):
         if EndOfProcedure is not None:\r
             EndOfProcedure.set()\r
         if Proc is None:\r
-            if type(Command) != type(""):\r
+            if not isinstance(Command, type("")):\r
                 Command = " ".join(Command)\r
             EdkLogger.error("build", COMMAND_FAILURE, "Failed to start command", ExtraData="%s [%s]" % (Command, WorkingDir))\r
 \r
@@ -316,7 +316,7 @@ def LaunchCommand(Command, WorkingDir):
 \r
     # check the return code of the program\r
     if Proc.returncode != 0:\r
-        if type(Command) != type(""):\r
+        if not isinstance(Command, type("")):\r
             Command = " ".join(Command)\r
         # print out the Response file and its content when make failure\r
         RespFile = os.path.join(WorkingDir, 'OUTPUT', 'respfilelist.txt')\r