summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Table
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2015-12-18 06:43:57 +0000
committervanjeff <vanjeff@Edk2>2015-12-18 06:43:57 +0000
commit253a4b8ccbb4a984189eb29c48c25f6ef266ca80 (patch)
treea2207b2a3a2e6f9a42a5d9262cf616dfa369b727 /BaseTools/Source/Python/Table
parent818e60d95106bd68679bf4be1cef67f0d0af4b6c (diff)
downloadedk2-platforms-253a4b8ccbb4a984189eb29c48c25f6ef266ca80.tar.xz
BaseTools: Clean some coding style issues
This patch clean some coding style issues, majorly for space character. (Sync patch r19080 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19369 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Table')
-rw-r--r--BaseTools/Source/Python/Table/TableReport.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/Table/TableReport.py b/BaseTools/Source/Python/Table/TableReport.py
index c7829c0097..4af0e98d86 100644
--- a/BaseTools/Source/Python/Table/TableReport.py
+++ b/BaseTools/Source/Python/Table/TableReport.py
@@ -68,14 +68,14 @@ class TableReport(Table):
# @param Enabled: If this error enabled
# @param Corrected: if this error corrected
#
- def Insert(self, ErrorID, OtherMsg = '', BelongsToTable = '', BelongsToItem = -1, Enabled = 0, Corrected = -1):
+ def Insert(self, ErrorID, OtherMsg='', BelongsToTable='', BelongsToItem= -1, Enabled=0, Corrected= -1):
self.ID = self.ID + 1
SqlCommand = """insert into %s values(%s, %s, '%s', '%s', %s, %s, %s)""" \
% (self.Table, self.ID, ErrorID, ConvertToSqlString2(OtherMsg), BelongsToTable, BelongsToItem, Enabled, Corrected)
Table.Insert(self, SqlCommand)
-
+
return self.ID
-
+
## Query table
#
# @retval: A recordSet of all found records
@@ -98,7 +98,7 @@ class TableReport(Table):
#
# @param Filename: To filename to save the report content
#
- def ToCSV(self, Filename = 'Report.csv'):
+ def ToCSV(self, Filename='Report.csv'):
try:
File = open(Filename, 'w+')
File.write("""No, Error Code, Error Message, File, LineNo, Other Error Message\n""")
@@ -123,7 +123,7 @@ class TableReport(Table):
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())