]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/InventoryWs.py
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / Python / UPT / InventoryWs.py
index cd92753a8d4b4849eb816d8a0812449ee384ffc3..c74e2086316b7c28f296a67a902aab56b634cf07 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # Inventory workspace's distribution package information.\r
 #\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 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
@@ -37,7 +37,7 @@ from Library import GlobalData
 #\r
 def InventoryDistInstalled(DataBase):\r
     DistInstalled = DataBase.InventoryDistInstalled()\r
-    \r
+\r
     #\r
     # find the max length for each item\r
     #\r
@@ -47,9 +47,9 @@ def InventoryDistInstalled(DataBase):
     DpOriginalNameStr = "DpOriginalName"\r
     MaxGuidlen = len(DpGuidStr)\r
     MaxVerlen = len(DpVerStr)\r
-    MaxDpAliasFileNameLen = len(DpNameStr) \r
+    MaxDpAliasFileNameLen = len(DpNameStr)\r
     MaxDpOrigFileNamelen = len(DpOriginalNameStr)\r
-    \r
+\r
     for (DpGuid, DpVersion, DpOriginalName, DpAliasFileName) in DistInstalled:\r
         MaxGuidlen = max(MaxGuidlen, len(DpGuid))\r
         MaxVerlen = max(MaxVerlen, len(DpVersion))\r
@@ -57,22 +57,22 @@ def InventoryDistInstalled(DataBase):
         MaxDpOrigFileNamelen = max(MaxDpOrigFileNamelen, len(DpOriginalName))\r
 \r
     OutMsgFmt = "%-*s\t%-*s\t%-*s\t%-s"\r
-    OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen, \r
-                          DpNameStr, \r
-                          MaxGuidlen, \r
-                          DpGuidStr, \r
-                          MaxVerlen, \r
-                          DpVerStr, \r
+    OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,\r
+                          DpNameStr,\r
+                          MaxGuidlen,\r
+                          DpGuidStr,\r
+                          MaxVerlen,\r
+                          DpVerStr,\r
                           DpOriginalNameStr)\r
     Logger.Info(OutMsg)\r
-    \r
+\r
     for (DpGuid, DpVersion, DpFileName, DpAliasFileName) in DistInstalled:\r
-        OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen, \r
-                            DpAliasFileName, \r
-                            MaxGuidlen, \r
-                            DpGuid, \r
-                            MaxVerlen, \r
-                            DpVersion, \r
+        OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,\r
+                            DpAliasFileName,\r
+                            MaxGuidlen,\r
+                            DpGuid,\r
+                            MaxVerlen,\r
+                            DpVersion,\r
                             DpFileName)\r
         Logger.Info(OutMsg)\r
 \r
@@ -90,13 +90,13 @@ def Main(Options = None):
 \r
     try:\r
         DataBase = GlobalData.gDB\r
-        InventoryDistInstalled(DataBase)     \r
-        ReturnCode = 0       \r
+        InventoryDistInstalled(DataBase)\r
+        ReturnCode = 0\r
     except FatalError as XExcept:\r
         ReturnCode = XExcept.args[0]\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())\r
-    except KeyboardInterrupt: \r
+    except KeyboardInterrupt:\r
         ReturnCode = ABORT_ERROR\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())\r
@@ -113,5 +113,5 @@ def Main(Options = None):
 \r
     if ReturnCode == 0:\r
         Logger.Quiet(ST.MSG_FINISH)\r
-    \r
-    return ReturnCode
\ No newline at end of file
+\r
+    return ReturnCode\r