]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/Check.py
BaseTools: replace string constants used for module types
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / Check.py
index 27783e617b9219bae0f796087f1cc4bac0f1ead3..089d42a6d181989a2d781fa42da22bd591416c26 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define checkpoints used by ECC 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
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -744,7 +744,7 @@ class Check(object):
                         if Item not in LibraryClasses[List[0]]:\r
                             LibraryClasses[List[0]].append(Item)\r
 \r
-                if Record[2] != 'BASE' and Record[2] not in SupModType:\r
+                if Record[2] != DT.SUP_MODULE_BASE and Record[2] not in SupModType:\r
                     EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_2, OtherMsg="The Library Class '%s' does not specify its supported module types" % (List[0]), BelongsToTable='Inf', BelongsToItem=Record[0])\r
 \r
             SqlCommand = """select A.ID, A.Value1, B.Value3 from Inf as A left join Inf as B\r
@@ -763,7 +763,7 @@ class Check(object):
 \r
             for Record in RecordSet:\r
                 if Record[1] in LibraryClasses:\r
-                    if Record[2] not in LibraryClasses[Record[1]] and 'BASE' not in RecordDict[Record[1]]:\r
+                    if Record[2] not in LibraryClasses[Record[1]] and DT.SUP_MODULE_BASE not in RecordDict[Record[1]]:\r
                         if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1, Record[1]):\r
                             EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1, OtherMsg="The type of Library Class [%s] defined in Inf file does not match the type of the module" % (Record[1]), BelongsToTable='Inf', BelongsToItem=Record[0])\r
                 else:\r