]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Parser/InfGuidPpiProtocolSectionParser.py
BaseTools: Remove equality operator with None
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Parser / InfGuidPpiProtocolSectionParser.py
index 10a82cbfd862da28d104f166910a5d2c743aa9ff..956c116c6e79536e8902c2bc257363ec02ae16fc 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file contained the parser for [Guids], [Ppis], [Protocols] sections in INF file \r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -77,7 +77,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
                                           FileName,\r
                                           DT.MODEL_EFI_GUID,\r
                                           self.FileLocalMacros)\r
-                if Name != None:\r
+                if Name is not None:\r
                     SectionMacros[Name] = Value\r
                     CommentsList = []\r
                     ValueList = []\r
@@ -164,7 +164,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
                                           FileName,\r
                                           DT.MODEL_EFI_PPI,\r
                                           self.FileLocalMacros)\r
-                if Name != None:\r
+                if Name is not None:\r
                     SectionMacros[Name] = Value\r
                     ValueList = []\r
                     CommentsList = []\r
@@ -217,8 +217,9 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
         for Line in SectionString:\r
             LineContent = Line[0]\r
 \r
-            if LineContent.strip() == '':\r
-                continue\r
+# Comment the code to support user extension without any statement just the section header in []\r
+#             if LineContent.strip() == '':\r
+#                 continue\r
 \r
             UserExtensionContent += LineContent + DT.END_OF_LINE\r
             continue\r
@@ -333,7 +334,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
                                           FileName,\r
                                           DT.MODEL_EFI_PROTOCOL,\r
                                           self.FileLocalMacros)\r
-                if Name != None:\r
+                if Name is not None:\r
                     SectionMacros[Name] = Value\r
                     ValueList = []\r
                     CommentsList = []\r