]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Parser/InfPackageSectionParser.py
BaseTools: Remove equality operator with None
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Parser / InfPackageSectionParser.py
index 67f1145322ad1799d22f78bd65c130008ca3ab77..8fb2898826e6fff6d71a0339c8fd3e2d9876ec72 100644 (file)
@@ -89,7 +89,7 @@ class InfPackageSectionParser(InfParserSectionRoot):
             if PkgLineContent.find(DT.TAB_COMMENT_SPLIT) > -1:\r
                 TailComments = PkgLineContent[PkgLineContent.find(DT.TAB_COMMENT_SPLIT):]\r
                 PkgLineContent = PkgLineContent[:PkgLineContent.find(DT.TAB_COMMENT_SPLIT)]\r
             if PkgLineContent.find(DT.TAB_COMMENT_SPLIT) > -1:\r
                 TailComments = PkgLineContent[PkgLineContent.find(DT.TAB_COMMENT_SPLIT):]\r
                 PkgLineContent = PkgLineContent[:PkgLineContent.find(DT.TAB_COMMENT_SPLIT)]\r
-                if LineComment == None:\r
+                if LineComment is None:\r
                     LineComment = InfLineCommentObject()\r
                 LineComment.SetTailComments(TailComments)                   \r
             #\r
                     LineComment = InfLineCommentObject()\r
                 LineComment.SetTailComments(TailComments)                   \r
             #\r
@@ -99,7 +99,7 @@ class InfPackageSectionParser(InfParserSectionRoot):
                                       FileName,\r
                                       DT.MODEL_META_DATA_PACKAGE,\r
                                       self.FileLocalMacros)\r
                                       FileName,\r
                                       DT.MODEL_META_DATA_PACKAGE,\r
                                       self.FileLocalMacros)\r
-            if Name != None:\r
+            if Name is not None:\r
                 SectionMacros[Name] = Value\r
                 LineComment = None\r
                 HeaderComments = []                \r
                 SectionMacros[Name] = Value\r
                 LineComment = None\r
                 HeaderComments = []                \r