]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Library/Misc.py
BaseTools: Fix old python2 idioms
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Library / Misc.py
index e16d309ef8838a52bb43ad061f96263976c968dd..28471d81238aeb283e4cea9a8a569e73d43e2966 100644 (file)
@@ -514,7 +514,7 @@ class PathClass(object):
     # Check whether PathClass are the same\r
     #\r
     def __eq__(self, Other):\r
-        if type(Other) == type(self):\r
+        if isinstance(Other, type(self)):\r
             return self.Path == Other.Path\r
         else:\r
             return self.Path == str(Other)\r
@@ -819,11 +819,11 @@ def ConvertArchList(ArchList):
     if not ArchList:\r
         return NewArchList\r
 \r
-    if type(ArchList) == list:\r
+    if isinstance(ArchList, list):\r
         for Arch in ArchList:\r
             Arch = Arch.upper()\r
             NewArchList.append(Arch)\r
-    elif type(ArchList) == str:\r
+    elif isinstance(ArchList, str):\r
         ArchList = ArchList.upper()\r
         NewArchList.append(ArchList)\r
 \r