]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / WorkspaceDatabase.py
index 9e055fcfc46bf8a038827a838c2cb84a5476b36c..a40ab8fc8c882c49aa0c32041870655f337ac834 100644 (file)
@@ -114,8 +114,8 @@ class WorkspaceDatabase(object):
 \r
             # get the parser ready for this file\r
             MetaFile = self._FILE_PARSER_[FileType](\r
 \r
             # get the parser ready for this file\r
             MetaFile = self._FILE_PARSER_[FileType](\r
-                                FilePath, \r
-                                FileType, \r
+                                FilePath,\r
+                                FileType,\r
                                 Arch,\r
                                 MetaFileStorage(self.WorkspaceDb.Cur, FilePath, FileType)\r
                                 )\r
                                 Arch,\r
                                 MetaFileStorage(self.WorkspaceDb.Cur, FilePath, FileType)\r
                                 )\r
@@ -162,7 +162,7 @@ class WorkspaceDatabase(object):
             # remove db file in case inconsistency between db and file in file system\r
             if self._CheckWhetherDbNeedRenew(RenewDb, DbPath):\r
                 os.remove(DbPath)\r
             # remove db file in case inconsistency between db and file in file system\r
             if self._CheckWhetherDbNeedRenew(RenewDb, DbPath):\r
                 os.remove(DbPath)\r
-        \r
+\r
         # create db with optimized parameters\r
         self.Conn = sqlite3.connect(DbPath, isolation_level='DEFERRED')\r
         self.Conn.execute("PRAGMA synchronous=OFF")\r
         # create db with optimized parameters\r
         self.Conn = sqlite3.connect(DbPath, isolation_level='DEFERRED')\r
         self.Conn.execute("PRAGMA synchronous=OFF")\r
@@ -199,11 +199,11 @@ class WorkspaceDatabase(object):
     def _CheckWhetherDbNeedRenew (self, force, DbPath):\r
         # if database does not exist, we need do nothing\r
         if not os.path.exists(DbPath): return False\r
     def _CheckWhetherDbNeedRenew (self, force, DbPath):\r
         # if database does not exist, we need do nothing\r
         if not os.path.exists(DbPath): return False\r
-            \r
+\r
         # if user force to renew database, then not check whether database is out of date\r
         if force: return True\r
         # if user force to renew database, then not check whether database is out of date\r
         if force: return True\r
-        \r
-        #    \r
+\r
+        #\r
         # Check the time of last modified source file or build.exe\r
         # if is newer than time of database, then database need to be re-created.\r
         #\r
         # Check the time of last modified source file or build.exe\r
         # if is newer than time of database, then database need to be re-created.\r
         #\r
@@ -217,15 +217,15 @@ class WorkspaceDatabase(object):
             if rootPath == "" or rootPath is None:\r
                 EdkLogger.verbose("\nFail to find the root path of build.exe or python sources, so can not \\r
 determine whether database file is out of date!\n")\r
             if rootPath == "" or rootPath is None:\r
                 EdkLogger.verbose("\nFail to find the root path of build.exe or python sources, so can not \\r
 determine whether database file is out of date!\n")\r
-        \r
+\r
             # walk the root path of source or build's binary to get the time last modified.\r
             # walk the root path of source or build's binary to get the time last modified.\r
-        \r
+\r
             for root, dirs, files in os.walk (rootPath):\r
                 for dir in dirs:\r
             for root, dirs, files in os.walk (rootPath):\r
                 for dir in dirs:\r
-                    # bypass source control folder \r
+                    # bypass source control folder\r
                     if dir.lower() in [".svn", "_svn", "cvs"]:\r
                         dirs.remove(dir)\r
                     if dir.lower() in [".svn", "_svn", "cvs"]:\r
                         dirs.remove(dir)\r
-                        \r
+\r
                 for file in files:\r
                     ext = os.path.splitext(file)[1]\r
                     if ext.lower() == ".py":            # only check .py files\r
                 for file in files:\r
                     ext = os.path.splitext(file)[1]\r
                     if ext.lower() == ".py":            # only check .py files\r
@@ -235,9 +235,9 @@ determine whether database file is out of date!\n")
         if timeOfToolModified > os.stat(DbPath).st_mtime:\r
             EdkLogger.verbose("\nWorkspace database is out of data!")\r
             return True\r
         if timeOfToolModified > os.stat(DbPath).st_mtime:\r
             EdkLogger.verbose("\nWorkspace database is out of data!")\r
             return True\r
-            \r
+\r
         return False\r
         return False\r
-            \r
+\r
     ## Initialize build database\r
     def InitDatabase(self):\r
         EdkLogger.verbose("\nInitialize build database started ...")\r
     ## Initialize build database\r
     def InitDatabase(self):\r
         EdkLogger.verbose("\nInitialize build database started ...")\r