]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/Ecc: Add line break support for exception list
authorHess Chen <hesheng.chen@intel.com>
Wed, 10 May 2017 01:29:50 +0000 (09:29 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 11 May 2017 01:29:08 +0000 (09:29 +0800)
Add line break support for exception list.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Ecc/Exception.py

index fffbf30a98e6a3c1634274a13f1685217310b5f3..b0882afa6289933bb0f79bd6e83f02db5644ded5 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to parse exception items found by ECC tool\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2017, 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
@@ -72,7 +72,7 @@ class ExceptionCheck(object):
             self.ExceptionList = self.ExceptionListXml.ToList()\r
     \r
     def IsException(self, ErrorID, KeyWord, FileID=-1):\r
-        if (str(ErrorID), KeyWord) in self.ExceptionList:\r
+        if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList:\r
             return True\r
         else:\r
             return False\r