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 <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This file is used to create/update/query/erase table for files
|
||||
#
|
||||
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@ -23,14 +23,14 @@ from CommonDataClass.DataClass import FileClass
|
||||
## TableFile
|
||||
#
|
||||
# This class defined a table used for file
|
||||
#
|
||||
#
|
||||
# @param object: Inherited from object class
|
||||
#
|
||||
class TableFile(Table):
|
||||
def __init__(self, Cursor):
|
||||
Table.__init__(self, Cursor)
|
||||
self.Table = 'File'
|
||||
|
||||
|
||||
## Create table
|
||||
#
|
||||
# Create table File
|
||||
@ -72,15 +72,15 @@ class TableFile(Table):
|
||||
SqlCommand = """insert into %s values(%s, '%s', '%s', '%s', '%s', %s, '%s')""" \
|
||||
% (self.Table, self.ID, Name, ExtName, Path, FullPath, Model, TimeStamp)
|
||||
Table.Insert(self, SqlCommand)
|
||||
|
||||
|
||||
return self.ID
|
||||
## InsertFile
|
||||
#
|
||||
# Insert one file to table
|
||||
#
|
||||
# @param FileFullPath: The full path of the file
|
||||
# @param Model: The model of the file
|
||||
#
|
||||
# @param Model: The model of the file
|
||||
#
|
||||
# @retval FileID: The ID after record is inserted
|
||||
#
|
||||
def InsertFile(self, FileFullPath, Model):
|
||||
@ -89,7 +89,7 @@ class TableFile(Table):
|
||||
TimeStamp = os.stat(FileFullPath)[8]
|
||||
File = FileClass(-1, Name, Ext, Filepath, FileFullPath, Model, '', [], [], [])
|
||||
return self.Insert(File.Name, File.ExtName, File.Path, File.FullPath, File.Model, TimeStamp)
|
||||
|
||||
|
||||
## Get ID of a given file
|
||||
#
|
||||
# @param FilePath Path of file
|
||||
|
Reference in New Issue
Block a user