]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
BaseTools: Replace StandardError with Expression
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / WorkspaceDatabase.py
index 2b888c0610c32576fd7168093183b76021723498..9e055fcfc46bf8a038827a838c2cb84a5476b36c 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create a database used by build tool\r
 #\r
-# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
@@ -16,7 +16,7 @@
 # Import Modules\r
 #\r
 import sqlite3\r
-from Common.String import *\r
+from Common.StringUtils import *\r
 from Common.DataType import *\r
 from Common.Misc import *\r
 from types import *\r
@@ -280,7 +280,7 @@ determine whether database file is out of date!\n")
     def GetPackageList(self, Platform, Arch, TargetName, ToolChainTag):\r
         self.Platform = Platform\r
         PackageList = []\r
-        Pa = self.BuildObject[self.Platform, Arch]\r
+        Pa = self.BuildObject[self.Platform, Arch, TargetName, ToolChainTag]\r
         #\r
         # Get Package related to Modules\r
         #\r
@@ -305,7 +305,7 @@ determine whether database file is out of date!\n")
         PlatformList = []\r
         for PlatformFile in self.TblFile.GetFileList(MODEL_FILE_DSC):\r
             try:\r
-                Platform = self.BuildObject[PathClass(PlatformFile), 'COMMON']\r
+                Platform = self.BuildObject[PathClass(PlatformFile), TAB_COMMON]\r
             except:\r
                 Platform = None\r
             if Platform is not None:\r
@@ -313,7 +313,7 @@ determine whether database file is out of date!\n")
         return PlatformList\r
 \r
     def _MapPlatform(self, Dscfile):\r
-        Platform = self.BuildObject[PathClass(Dscfile), 'COMMON']\r
+        Platform = self.BuildObject[PathClass(Dscfile), TAB_COMMON]\r
         if Platform is None:\r
             EdkLogger.error('build', PARSER_ERROR, "Failed to parser DSC file: %s" % Dscfile)\r
         return Platform\r