## @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
# 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
else:\r
curPath = os.path.dirname(__file__) # curPath is the path of WorkspaceDatabase.py\r
rootPath = os.path.split(curPath)[0] # rootPath is root path of python source, such as /BaseTools/Source/Python\r
- if rootPath == "" or rootPath == None:\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
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
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 != None:\r
+ if Platform is not None:\r
PlatformList.append(Platform)\r
return PlatformList\r
\r
def _MapPlatform(self, Dscfile):\r
- Platform = self.BuildObject[PathClass(Dscfile), 'COMMON']\r
- if Platform == None:\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
\r