From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 63D4021164EF8 for ; Sun, 21 Oct 2018 05:05:49 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2018 05:05:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,408,1534834800"; d="scan'208";a="101120945" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 21 Oct 2018 05:05:48 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 21 Oct 2018 05:05:48 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 21 Oct 2018 05:05:47 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.224]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.21]) with mapi id 14.03.0319.002; Sun, 21 Oct 2018 20:05:45 +0800 From: "Zhu, Yonghong" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH v1 1/1] BaseTools: delete unused file Thread-Index: AQHUYPFaFqSTIMbzzkeiH8PkKbial6UpqtjA Date: Sun, 21 Oct 2018 12:05:44 +0000 Message-ID: References: <88f662779872aa3d7e5779e459e2ecbb33de6373.1539214181.git.jaben.carsey@intel.com> In-Reply-To: <88f662779872aa3d7e5779e459e2ecbb33de6373.1539214181.git.jaben.carsey@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1 1/1] BaseTools: delete unused file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2018 12:05:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben=20 Sent: Thursday, October 11, 2018 7:30 AM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zhu, Yonghong Subject: [PATCH v1 1/1] BaseTools: delete unused file this file is not imported/used. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Database.py | 120 -------------------- 1 file changed, 120 deletions(-) diff --git a/BaseTools/Source/Python/Common/Database.py b/BaseTools/Source/= Python/Common/Database.py deleted file mode 100644 index 1c543aeb41b1..000000000000 --- a/BaseTools/Source/Python/Common/Database.py +++ /dev/null @@ -1,120 +0,0 @@ -## @file -# This file is used to create a database used by ECC tool -# -# Copyright = (c) 2007 - 2018, Intel Corporation. All rights reserved.
-# This progra= m and the accompanying materials -# are licensed and made available under t= he terms and conditions of the BSD License -# which accompanies this distri= bution. 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, -#= WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLI= ED. -# - -## -# Import Modules -# -from __future__ import absolute_import -import sqlite3 -import Common.LongFilePathOs as os - -from . import EdkLogger as EdkLogger -from CommonDataClass.DataClass import * -from .StringUtils import * -from = .DataType import * - -from Table.TableDataModel import TableDataModel -from Table.TableFile impo= rt TableFile -from Table.TableInf import TableInf -from Table.TableDec impo= rt TableDec -from Table.TableDsc import TableDsc - -## Database -# -# This class defined the build databse -# During the phase of initialization, the database will create all tables = and -# insert all records of table DataModel -# -# @param object: Inherited from object class -# @param DbPath: A string for the path of the ECC database -# -# @var Conn: Connection of the ECC database -# @var Cur: Cursor of the connection -# @var TblDataModel: Local instance for TableDataModel -# -class Database= (object): - def __init__(self, DbPath): - if os.path.exists(DbPath): - os.remove(DbPath) - self.Conn =3D sqlite3.connect(DbPath, isolation_level =3D 'DEFERRE= D') - self.Conn.execute("PRAGMA page_size=3D8192") - self.Conn.execute("PRAGMA synchronous=3DOFF") - self.Cur =3D self.Conn.cursor() - self.TblDataModel =3D TableDataModel(self.Cur) - self.TblFile =3D TableFile(self.Cur) - self.TblInf =3D TableInf(self.Cur) - self.TblDec =3D TableDec(self.Cur) - self.TblDsc =3D TableDsc(self.Cur) - - ## Initialize build database - # - # 1. Delete all old existing tables - # 2. Create new tables - # 3. Initialize table DataModel - # - def InitDatabase(self): - EdkLogger.verbose("\nInitialize ECC database started ...") - # - # Drop all old existing tables - # -# self.TblDataModel.Drop() -# self.TblDsc.Drop() -# self.TblFile.Drop() - - # - # Create new tables - # - self.TblDataModel.Create() - self.TblFile.Create() - self.TblInf.Create() - self.TblDec.Create() - self.TblDsc.Create() - - # - # Initialize table DataModel - # - self.TblDataModel.InitTable() - EdkLogger.verbose("Initialize ECC database ... DONE!") - - ## Query a table - # - # @param Table: The instance of the table to be queried - # - def QueryTable(self, Table): - Table.Query() - - ## Close entire database - # - # Commit all first - # Close the connection and cursor - # - def Close(self): - self.Conn.commit() - self.Cur.close() - self.Conn.close() - -## -# -# This acts like the main() function for the script, unless it is 'import'= ed into another -# script. -# -if __name__ =3D=3D '__main__': - EdkLogger.Initialize() - EdkLogger.SetLevel(EdkLogger.DEBUG_0) - - Db =3D Database(DATABASE_PATH) - Db.InitDatabase() - Db.QueryTable(Db.TblDataModel) - Db.QueryTable(Db.TblFile) - Db.QueryTable(Db.TblDsc) - Db.Close() -- 2.16.2.windows.1