]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/MetaFileTable.py
BaseTools: Remove equality operator with None
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / MetaFileTable.py
index d8549c9d66e674cc7661b850c198ab386b05a4f5..be3fb3d688569c679099303804fb1f7da0d6044b 100644 (file)
@@ -140,11 +140,11 @@ class ModuleTable(MetaFileTable):
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
         ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine"\r
 \r
-        if Arch != None and Arch != 'COMMON':\r
+        if Arch is not None and Arch != 'COMMON':\r
             ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Arch\r
-        if Platform != None and Platform != 'COMMON':\r
+        if Platform is not None and Platform != 'COMMON':\r
             ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Platform\r
-        if BelongsToItem != None:\r
+        if BelongsToItem is not None:\r
             ConditionString += " AND BelongsToItem=%s" % BelongsToItem\r
 \r
         SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString)\r
@@ -221,7 +221,7 @@ class PackageTable(MetaFileTable):
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
         ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine"\r
 \r
-        if Arch != None and Arch != 'COMMON':\r
+        if Arch is not None and Arch != 'COMMON':\r
             ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Arch\r
 \r
         SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString)\r
@@ -341,9 +341,9 @@ class PlatformTable(MetaFileTable):
         ConditionString = "Model=%s AND Enabled>0" % Model\r
         ValueString = "Value1,Value2,Value3,Scope1,Scope2,Scope3,ID,StartLine"\r
 \r
-        if Scope1 != None and Scope1 != 'COMMON':\r
+        if Scope1 is not None and Scope1 != 'COMMON':\r
             ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Scope1\r
-        if Scope2 != None and Scope2 != 'COMMON':\r
+        if Scope2 is not None and Scope2 != 'COMMON':\r
             # Cover the case that CodeBase is 'COMMON' for BuildOptions section\r
             if '.' in Scope2:\r
                 Index = Scope2.index('.')\r
@@ -352,12 +352,12 @@ class PlatformTable(MetaFileTable):
             else:\r
                 ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Scope2\r
 \r
-        if BelongsToItem != None:\r
+        if BelongsToItem is not None:\r
             ConditionString += " AND BelongsToItem=%s" % BelongsToItem\r
         else:\r
             ConditionString += " AND BelongsToItem<0"\r
 \r
-        if FromItem != None:\r
+        if FromItem is not None:\r
             ConditionString += " AND FromItem=%s" % FromItem\r
 \r
         SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString)\r