summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Table
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-28 23:39:39 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-28 23:39:39 +0000
commit52302d4dee589a5df43a464420c9fe68ba83937d (patch)
tree2393f61b9e8975134e3cdfa0352d4c51a3b2ac8d /BaseTools/Source/Python/Table
parentfe35c036354c4b6bf18c4699a45156f3965fae2a (diff)
downloadedk2-platforms-52302d4dee589a5df43a464420c9fe68ba83937d.tar.xz
Sync EDKII BaseTools to BaseTools project r1903.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10123 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Table')
-rw-r--r--BaseTools/Source/Python/Table/TableEotReport.py4
-rw-r--r--BaseTools/Source/Python/Table/TableQuery.py20
-rw-r--r--BaseTools/Source/Python/Table/TableReport.py5
-rw-r--r--BaseTools/Source/Python/Table/__init__.py15
4 files changed, 31 insertions, 13 deletions
diff --git a/BaseTools/Source/Python/Table/TableEotReport.py b/BaseTools/Source/Python/Table/TableEotReport.py
index cdae3b2e39..2d98129e4f 100644
--- a/BaseTools/Source/Python/Table/TableEotReport.py
+++ b/BaseTools/Source/Python/Table/TableEotReport.py
@@ -18,8 +18,8 @@ import Common.EdkLogger as EdkLogger
import os, time
from Table import Table
from Common.String import ConvertToSqlString2
-import EotToolError as EotToolError
-import EotGlobalData as EotGlobalData
+import Eot.EotToolError as EotToolError
+import Eot.EotGlobalData as EotGlobalData
## TableReport
#
diff --git a/BaseTools/Source/Python/Table/TableQuery.py b/BaseTools/Source/Python/Table/TableQuery.py
index 9a9a66ccb6..4ad9dc5e55 100644
--- a/BaseTools/Source/Python/Table/TableQuery.py
+++ b/BaseTools/Source/Python/Table/TableQuery.py
@@ -21,7 +21,7 @@ from Table import Table
## TableQuery
#
# This class defined a table used for Query
-#
+#
# @param object: Inherited from object class
#
#
@@ -29,19 +29,21 @@ class TableQuery(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Query'
-
+
## Create table
#
# Create table Query
#
# @param ID: ID of a Query
- # @param Name: Modifier of a Query
+ # @param Name: Name of a Query
+ # @param Modifer: Modifier of a Query
# @param Value: Type of a Query
# @param Model: Model of a Query
#
def Create(self):
SqlCommand = """create table IF NOT EXISTS %s(ID INTEGER PRIMARY KEY,
Name TEXT DEFAULT '',
+ Modifier TEXT DEFAULT '',
Value TEXT DEFAULT '',
Model INTEGER DEFAULT 0
)""" % self.Table
@@ -52,15 +54,15 @@ class TableQuery(Table):
# Insert a record into table Query
#
# @param ID: ID of a Query
- # @param Name: Modifier of a Query
- # @param Value: Type of a Query
+ # @param Name: Name of a Query
+ # @param Modifier: Modifier of a Query
+ # @param Value: Value of a Query
# @param Model: Model of a Query
#
- def Insert(self, Name, Value, Model):
+ def Insert(self, Name, Modifier, Value, Model):
self.ID = self.ID + 1
- SqlCommand = """insert into %s values(%s, '%s', '%s', %s)""" \
- % (self.Table, self.ID, Name, Value, Model)
+ SqlCommand = """insert into %s values(%s, '%s', '%s', '%s', %s)""" \
+ % (self.Table, self.ID, Name, Modifier, Value, Model)
Table.Insert(self, SqlCommand)
return self.ID
- \ No newline at end of file
diff --git a/BaseTools/Source/Python/Table/TableReport.py b/BaseTools/Source/Python/Table/TableReport.py
index 042c1b7e9e..777a479156 100644
--- a/BaseTools/Source/Python/Table/TableReport.py
+++ b/BaseTools/Source/Python/Table/TableReport.py
@@ -1,7 +1,7 @@
## @file
# This file is used to create/update/query/erase table for ECC reports
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008 - 2010, 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
@@ -114,7 +114,8 @@ class TableReport(Table):
NewRecord = self.Exec(SqlCommand)
if NewRecord != []:
File.write("""%s,%s,"%s",%s,%s,"%s"\n""" % (Index, ErrorID, EccToolError.gEccErrorMessage[ErrorID], NewRecord[0][1], NewRecord[0][0], OtherMsg))
-
+ EdkLogger.quiet("%s(%s): [%s]%s %s" % (NewRecord[0][1], NewRecord[0][0], ErrorID, EccToolError.gEccErrorMessage[ErrorID], OtherMsg))
+
File.close()
except IOError:
NewFilename = 'Report_' + time.strftime("%Y%m%d_%H%M%S.csv", time.localtime())
diff --git a/BaseTools/Source/Python/Table/__init__.py b/BaseTools/Source/Python/Table/__init__.py
index e69de29bb2..ea0b26743f 100644
--- a/BaseTools/Source/Python/Table/__init__.py
+++ b/BaseTools/Source/Python/Table/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'Table' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation<BR>
+# 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
+# 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 IMPLIED.
+#