summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/InventoryWs.py
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-07-05 17:40:04 +0800
committerLiming Gao <liming.gao@intel.com>2018-07-09 10:25:47 +0800
commitf7496d717357b9af78414d19679b073403812340 (patch)
tree67621e65fd181bdf8a12d12e7706579beaaed0fb /BaseTools/Source/Python/UPT/InventoryWs.py
parent39456d00f36e04b7e7efb208f350f4e83b6c3531 (diff)
downloadedk2-f7496d717357b9af78414d19679b073403812340.tar.gz
edk2-f7496d717357b9af78414d19679b073403812340.tar.bz2
edk2-f7496d717357b9af78414d19679b073403812340.zip
BaseTools: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/InventoryWs.py')
-rw-r--r--BaseTools/Source/Python/UPT/InventoryWs.py50
1 files changed, 25 insertions, 25 deletions
diff --git a/BaseTools/Source/Python/UPT/InventoryWs.py b/BaseTools/Source/Python/UPT/InventoryWs.py
index cd92753a8d..c74e208631 100644
--- a/BaseTools/Source/Python/UPT/InventoryWs.py
+++ b/BaseTools/Source/Python/UPT/InventoryWs.py
@@ -1,11 +1,11 @@
## @file
# Inventory workspace's distribution package information.
#
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
#
-# This program and the accompanying materials are licensed and made available
-# under the terms and conditions of the BSD License which accompanies this
-# distribution. The full text of the license may be found at
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@@ -37,7 +37,7 @@ from Library import GlobalData
#
def InventoryDistInstalled(DataBase):
DistInstalled = DataBase.InventoryDistInstalled()
-
+
#
# find the max length for each item
#
@@ -47,9 +47,9 @@ def InventoryDistInstalled(DataBase):
DpOriginalNameStr = "DpOriginalName"
MaxGuidlen = len(DpGuidStr)
MaxVerlen = len(DpVerStr)
- MaxDpAliasFileNameLen = len(DpNameStr)
+ MaxDpAliasFileNameLen = len(DpNameStr)
MaxDpOrigFileNamelen = len(DpOriginalNameStr)
-
+
for (DpGuid, DpVersion, DpOriginalName, DpAliasFileName) in DistInstalled:
MaxGuidlen = max(MaxGuidlen, len(DpGuid))
MaxVerlen = max(MaxVerlen, len(DpVersion))
@@ -57,22 +57,22 @@ def InventoryDistInstalled(DataBase):
MaxDpOrigFileNamelen = max(MaxDpOrigFileNamelen, len(DpOriginalName))
OutMsgFmt = "%-*s\t%-*s\t%-*s\t%-s"
- OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,
- DpNameStr,
- MaxGuidlen,
- DpGuidStr,
- MaxVerlen,
- DpVerStr,
+ OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,
+ DpNameStr,
+ MaxGuidlen,
+ DpGuidStr,
+ MaxVerlen,
+ DpVerStr,
DpOriginalNameStr)
Logger.Info(OutMsg)
-
+
for (DpGuid, DpVersion, DpFileName, DpAliasFileName) in DistInstalled:
- OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,
- DpAliasFileName,
- MaxGuidlen,
- DpGuid,
- MaxVerlen,
- DpVersion,
+ OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,
+ DpAliasFileName,
+ MaxGuidlen,
+ DpGuid,
+ MaxVerlen,
+ DpVersion,
DpFileName)
Logger.Info(OutMsg)
@@ -90,13 +90,13 @@ def Main(Options = None):
try:
DataBase = GlobalData.gDB
- InventoryDistInstalled(DataBase)
- ReturnCode = 0
+ InventoryDistInstalled(DataBase)
+ ReturnCode = 0
except FatalError as XExcept:
ReturnCode = XExcept.args[0]
if Logger.GetLevel() <= Logger.DEBUG_9:
Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())
- except KeyboardInterrupt:
+ except KeyboardInterrupt:
ReturnCode = ABORT_ERROR
if Logger.GetLevel() <= Logger.DEBUG_9:
Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())
@@ -113,5 +113,5 @@ def Main(Options = None):
if ReturnCode == 0:
Logger.Quiet(ST.MSG_FINISH)
-
- return ReturnCode \ No newline at end of file
+
+ return ReturnCode