X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FTable%2FTableReport.py;h=4065a43c5b55a4df81a61341bafcdc8d9a8fc90c;hb=1be2ed90a20618d71ddf34b8a07d038da0b36854;hp=042c1b7e9e792e61f7dbd34c40b30a1a814e04ca;hpb=30fdf1140b8d1ce93f3821d986fa165552023440;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/Table/TableReport.py b/BaseTools/Source/Python/Table/TableReport.py index 042c1b7e9e..4065a43c5b 100644 --- a/BaseTools/Source/Python/Table/TableReport.py +++ b/BaseTools/Source/Python/Table/TableReport.py @@ -1,8 +1,8 @@ ## @file # This file is used to create/update/query/erase table for ECC reports # -# Copyright (c) 2008, Intel Corporation -# All rights reserved. This program and the accompanying materials +# Copyright (c) 2008 - 2014, 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 # http://opensource.org/licenses/bsd-license.php @@ -15,11 +15,12 @@ # Import Modules # import Common.EdkLogger as EdkLogger -import os, time +import Common.LongFilePathOs as os, time from Table import Table from Common.String import ConvertToSqlString2 import EccToolError as EccToolError import EccGlobalData as EccGlobalData +from Common.LongFilePathSupport import OpenLongFilePath as open ## TableReport # @@ -105,7 +106,7 @@ class TableReport(Table): IsCorrected = Record[5] SqlCommand = '' if BelongsToTable == 'File': - SqlCommand = """select 0, FullPath from %s where ID = %s + SqlCommand = """select 1, FullPath from %s where ID = %s """ % (BelongsToTable, BelongsToItem) else: SqlCommand = """select A.StartLine, B.FullPath from %s as A, File as B @@ -114,7 +115,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())