From f7496d717357b9af78414d19679b073403812340 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Thu, 5 Jul 2018 17:40:04 +0800 Subject: 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 Cc: Yonghong Zhu Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Table/Table.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'BaseTools/Source/Python/Table/Table.py') diff --git a/BaseTools/Source/Python/Table/Table.py b/BaseTools/Source/Python/Table/Table.py index c311df91c2..e89b99320d 100644 --- a/BaseTools/Source/Python/Table/Table.py +++ b/BaseTools/Source/Python/Table/Table.py @@ -1,7 +1,7 @@ ## @file # This file is used to create/update/query/erase a common table # -# Copyright (c) 2008, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
# 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 @@ -19,7 +19,7 @@ import Common.EdkLogger as EdkLogger ## TableFile # # This class defined a common table -# +# # @param object: Inherited from object class # # @param Cursor: Cursor of the database @@ -30,7 +30,7 @@ class Table(object): self.Cur = Cursor self.Table = '' self.ID = 0 - + ## Create table # # Create a table @@ -46,18 +46,18 @@ class Table(object): # def Insert(self, SqlCommand): self.Exec(SqlCommand) - + ## Query table # # Query all records of the table - # + # def Query(self): EdkLogger.verbose("\nQuery tabel %s started ..." % self.Table) SqlCommand = """select * from %s""" % self.Table self.Cur.execute(SqlCommand) for Rs in self.Cur: EdkLogger.verbose(str(Rs)) - + TotalCount = self.GetCount() EdkLogger.verbose("*** Total %s records in table %s ***" % (TotalCount, self.Table) ) EdkLogger.verbose("Query tabel %s DONE!" % self.Table) @@ -70,7 +70,7 @@ class Table(object): SqlCommand = """drop table IF EXISTS %s""" % self.Table self.Cur.execute(SqlCommand) EdkLogger.verbose("Drop tabel %s ... DONE!" % self.Table) - + ## Get count # # Get a count of all records of the table @@ -82,12 +82,12 @@ class Table(object): self.Cur.execute(SqlCommand) for Item in self.Cur: return Item[0] - + ## Generate ID # # Generate an ID if input ID is -1 # - # @param ID: Input ID + # @param ID: Input ID # # @retval ID: New generated ID # @@ -96,14 +96,14 @@ class Table(object): self.ID = self.ID + 1 return self.ID - + ## Init the ID of the table # # Init the ID of the table # def InitID(self): self.ID = self.GetCount() - + ## Exec # # Exec Sql Command, return result -- cgit v1.2.3