]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Object / Parser / InfMisc.py
index 4ed739d66fb2762649b19a77387e86ca2ba471bf..c75e7d7a3ed0db084e076e20798772dd28cfd8d4 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file miscellaneous. \r
-# Include BootMode/HOB/Event and others. It will consumed by InfParser. \r
+# This file is used to define class objects of INF file miscellaneous.\r
+# Include BootMode/HOB/Event and others. It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, 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
-# distribution. The full text of the license may be found at \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
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -23,7 +23,7 @@ from Library import DataType as DT
 from Object.Parser.InfCommonObject import InfSectionCommonDef\r
 from Library.Misc import Sdict\r
 \r
-## \r
+##\r
 # BootModeObject\r
 #\r
 class InfBootModeObject():\r
@@ -31,16 +31,16 @@ class InfBootModeObject():
         self.SupportedBootModes = ''\r
         self.HelpString = ''\r
         self.Usage = ''\r
-            \r
+\r
     def SetSupportedBootModes(self, SupportedBootModes):\r
-        self.SupportedBootModes = SupportedBootModes   \r
+        self.SupportedBootModes = SupportedBootModes\r
     def GetSupportedBootModes(self):\r
         return self.SupportedBootModes\r
 \r
     def SetHelpString(self, HelpString):\r
         self.HelpString = HelpString\r
     def GetHelpString(self):\r
-        return self.HelpString    \r
+        return self.HelpString\r
 \r
     def SetUsage(self, Usage):\r
         self.Usage = Usage\r
@@ -54,18 +54,18 @@ class InfEventObject():
         self.EventType = ''\r
         self.HelpString = ''\r
         self.Usage = ''\r
-            \r
+\r
     def SetEventType(self, EventType):\r
         self.EventType = EventType\r
-    \r
+\r
     def GetEventType(self):\r
         return self.EventType\r
-    \r
+\r
     def SetHelpString(self, HelpString):\r
         self.HelpString = HelpString\r
     def GetHelpString(self):\r
-        return self.HelpString    \r
-    \r
+        return self.HelpString\r
+\r
     def SetUsage(self, Usage):\r
         self.Usage = Usage\r
     def GetUsage(self):\r
@@ -79,36 +79,36 @@ class InfHobObject():
         self.Usage = ''\r
         self.SupArchList = []\r
         self.HelpString = ''\r
-        \r
+\r
     def SetHobType(self, HobType):\r
         self.HobType = HobType\r
-    \r
+\r
     def GetHobType(self):\r
         return self.HobType\r
-    \r
+\r
     def SetUsage(self, Usage):\r
         self.Usage = Usage\r
     def GetUsage(self):\r
         return self.Usage\r
-    \r
+\r
     def SetSupArchList(self, ArchList):\r
         self.SupArchList = ArchList\r
     def GetSupArchList(self):\r
         return self.SupArchList\r
-    \r
+\r
     def SetHelpString(self, HelpString):\r
         self.HelpString = HelpString\r
     def GetHelpString(self):\r
         return self.HelpString\r
-    \r
+\r
 ##\r
 # InfSpecialCommentObject\r
-#    \r
+#\r
 class InfSpecialCommentObject(InfSectionCommonDef):\r
     def __init__(self):\r
         self.SpecialComments = Sdict()\r
         InfSectionCommonDef.__init__(self)\r
-        \r
+\r
     def SetSpecialComments(self, SepcialSectionList = None, Type = ''):\r
         if Type == DT.TYPE_HOB_SECTION or \\r
            Type == DT.TYPE_EVENT_SECTION or \\r
@@ -122,27 +122,27 @@ class InfSpecialCommentObject(InfSectionCommonDef):
                     ObjList = []\r
                     ObjList.append(Item)\r
                     self.SpecialComments[Type] = ObjList\r
-           \r
+\r
         return True\r
-    \r
+\r
     def GetSpecialComments(self):\r
         return self.SpecialComments\r
 \r
 \r
 \r
 ## ErrorInInf\r
-# \r
+#\r
 # An encapsulate of Error for INF parser.\r
-# \r
+#\r
 def ErrorInInf(Message=None, ErrorCode=None, LineInfo=None, RaiseError=True):\r
     if ErrorCode is None:\r
         ErrorCode = ToolError.FORMAT_INVALID\r
     if LineInfo is None:\r
         LineInfo = ['', -1, '']\r
-    Logger.Error("InfParser", \r
-                 ErrorCode, \r
-                 Message=Message, \r
-                 File=LineInfo[0], \r
+    Logger.Error("InfParser",\r
+                 ErrorCode,\r
+                 Message=Message,\r
+                 File=LineInfo[0],\r
                  Line=LineInfo[1],\r
-                 ExtraData=LineInfo[2], \r
+                 ExtraData=LineInfo[2],\r
                  RaiseError=RaiseError)\r