]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
BaseTools: Remove equality operator with None
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / CodeFragmentCollector.py
index 171600feebf9f978b6c1c74857fafd98399e02f5..fbe0c41b38b7e616c7710f078d0c4520885c13c3 100644 (file)
@@ -301,7 +301,7 @@ class CodeFragmentCollector:
                 InCharLiteral = not InCharLiteral\r
             # meet new line, then no longer in a comment for // and '#'\r
             if self.__CurrentChar() == T_CHAR_LF:\r
-                if HashComment and PPDirectiveObj != None:\r
+                if HashComment and PPDirectiveObj is not None:\r
                     if PPDirectiveObj.Content.rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):\r
                         PPDirectiveObj.Content += T_CHAR_LF\r
                         PPExtend = True\r
@@ -423,7 +423,7 @@ class CodeFragmentCollector:
                 InCharLiteral = not InCharLiteral\r
             # meet new line, then no longer in a comment for // and '#'\r
             if self.__CurrentChar() == T_CHAR_LF:\r
-                if HashComment and PPDirectiveObj != None:\r
+                if HashComment and PPDirectiveObj is not None:\r
                     if PPDirectiveObj.Content.rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):\r
                         PPDirectiveObj.Content += T_CHAR_LF\r
                         PPExtend = True\r